*Preface:*

I'm fairly experienced with TWC and I'm just now beginning to fool around 
with TW5. TWC was fairly straightforward: If you wanted to modify the 
underlying UI and/or functionality of the wiki, you create a macro and use 
JavaScript together with the built-in TW functions like 
"createTiddlyButton" to build the elements you want to dynamically insert. 
In comparison, TW5's system of widgets, macros, variables, 
transclusion-heavy tiddlers, etc. was a bit overwhelming at first but I'm 
beginning to get a handle on it... or so I thought.

*Issue:*

I want to make it so I can press Enter to add a tag instead having to click 
the "Add" button every time. They KeyboardWidget 
<tiddlywiki.com/#KeyboardWidget:KeyboardWidget> seemed built specifically 
for this purpose.

I edited *$:/core/ui/EditTemplate/tags* and surrounded the "add tag" 
$edit-text widget with my $keyboard widget like so:

<$keyboard message="tm-add-tag" param={{$:/temp/NewTagName}} key="enter">
<$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>

The good news is, when I press Enter, it now adds whatever text is in the 
"add tag" field to the tag list. The bad news is, as I'm typing, after 
every keypress the "add tag" field loses focus, essentially making typing 
impossible.

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 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/9484f4fd-167a-48e7-80bc-2832b3fa95f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to