Skip to content

Thoughts on managing focus? #255

Answered by mike-thompson-day8
esnyder asked this question in Q&A
Discussion options

You must be logged in to vote

First, there's these thoughts:
http://day8.github.io/re-frame/FAQs/FocusOnElement/

Second, I remember someone once talked about a technique in which you would render all page elements with a tabindex of -1 except for the one to which you wanted focus transferred, to which you would give the value 0.

So, as the user left a field, the to-be-the-new-focus element was rerendered with a tabindex of 0 (it was -1 before). In effect, the application was driving focus by rerendering the tabindex attribute of fields, as the user moved about. Warning: I've never tried this technique and I don't know if it works.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@esnyder
Comment options

Answer selected by esnyder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants