Hi Novan

Expanding on Mario’s answer, the specific problem here is that each change to 
$:/temp/NewTagName triggers a refresh of the entire keyboard widget. You can 
avoid it by switching to using an action widget via the “actions” attribute. 
For example

\define the-actions()
<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
\end

<$keyboard key=“enter” actions=<<the-actions>>>
<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" 
placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} 
focusPopup=<<qualify"$:/state/popup/tags-auto-complete">> 
class="tc-edit-texteditor tc-popup-handle"/>
</$keyboard>

Here, the content of the “actions” attribute isn’t parsed and rendered until 
the action is triggered, avoiding the refresh problem.

Best wishes

Jeremy.


> On 27 Sep 2016, at 20:10, PMario <[email protected]> wrote:
> 
> On Tuesday, September 27, 2016 at 4:12:15 PM UTC+2, Novan Leon wrote:
> This seems like a fairly simple use case but perhaps I'm missing something. 
> Am I making a mistake or is this a known issues with KeyboardWidget 
> <https://groups.google.com/forum/tiddlywiki.com/#KeyboardWidget:KeyboardWidget>?
>  Without visibility into the underlying JavaScript behind the widget itself, 
> it's difficult to diagnose.
> 
> You don't miss anything. ... That's a problem "by design" and html input 
> element focus behaviour :/
> 
> The TiddlyWiki5 widget refresh mechanism is much more aggressive then 
> TWclassic's. It basically propagates every single key stroke. That makes it 
> possible, to dynamically update the eg: tag dropdown. Which gets shorter 
> everytime you add a new character. That behaviour is intended, but there is a 
> donwside too.
> 
> Since the keyboard widget wrapps the edit-text widget, every time you type a 
> character both of them are redrawn, which causes a focus loss for the text 
> input. 
> 
> The only possibility imo would be a new edit-xxx widget, that propagates text 
> changes only on eg: shift or ctrl presses. Which would be an interesting 
> experiment.
> 
> have fun!
> mario
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywiki 
> <https://groups.google.com/group/tiddlywiki>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/1e8c333d-55dd-49f4-9e41-42854eb8ab99%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/1e8c333d-55dd-49f4-9e41-42854eb8ab99%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1FE729AB-491A-4AEC-A6F5-1110E85884E5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to