Move focus to the search inputbox on load

61 views
Skip to first unread message

Ruler11

unread,
Dec 19, 2013, 6:01:35 AM12/19/13
to tiddl...@googlegroups.com
Hello, what would be the easiest way of moving text focus to a predefined inputbox on loading tiddlywiki?

Jeremy Ruston

unread,
Dec 20, 2013, 4:53:19 PM12/20/13
to TiddlyWiki
On Thu, Dec 19, 2013 at 11:01 AM, Ruler11 <ruler...@gmail.com> wrote:
Hello, what would be the easiest way of moving text focus to a predefined inputbox on loading tiddlywiki?

There's no focus handling in TW5 at the moment. There's a few places where it is important: for instance, we'd like to be able to press enter to confirm a new tag and move the focus to the input box for typing another tag. We'll need a mechanism that can cope with that kind of logic.

The case of autofocussing an inputbox on page load might be relatively simple: there is an HTML autofocus attribute that automatically focusses an element. The <$edit-text> widget doesn't support it at the moment, but could be extended to do so.

Can you describe your use case a bit more?

Best wishes

Jeremy
 

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Ruler11

unread,
Dec 24, 2013, 4:05:10 AM12/24/13
to tiddl...@googlegroups.com, jeremy...@gmail.com


On Saturday, December 21, 2013 1:53:19 AM UTC+4, Jeremy Ruston wrote:
On Thu, Dec 19, 2013 at 11:01 AM, Ruler11 <ruler...@gmail.com> wrote:
Hello, what would be the easiest way of moving text focus to a predefined inputbox on loading tiddlywiki?

There's no focus handling in TW5 at the moment. There's a few places where it is important: for instance, we'd like to be able to press enter to confirm a new tag and move the focus to the input box for typing another tag. We'll need a mechanism that can cope with that kind of logic.

The case of autofocussing an inputbox on page load might be relatively simple: there is an HTML autofocus attribute that automatically focusses an element. The <$edit-text> widget doesn't support it at the moment, but could be extended to do so.

Can you describe your use case a bit more?

I think you explained it all. Thanks. Will be waiting for the implementation.
Reply all
Reply to author
Forward
0 new messages