App specification should require preservation of tab selection #204

IgorMinar opened this Issue Jul 1, 2012 · 3 comments

3 participants


If a user uses keyboard to navigate in the app, it should be possible for her to tab onto an item, hit spacebar to select it. If a space bar is hit again the very same item should be deselected.

This is an requirement that tests whether frameworks provide good UX by default. Many use innerHTML to update a whole chunk of DOM, which is destructive and causes focus / text selection and other properties of DOM subtree that is being replaced to be lost.

In contrast to innerHTML AngularJS and I believe Ember and Knockout use fine-grained dom manipulation which avoids this pitfall.

TasteJS member

Any ideas on how to solve this with String-based templating? Which most frameworks use.

TasteJS member

Could probably use Mutation Observers to see if the document.activeElement is modified and if so, refocus it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment