Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use single focus trap at app root for all hotkeys #48

Closed
thomasboyt opened this issue Jan 11, 2016 · 2 comments
Closed

Use single focus trap at app root for all hotkeys #48

thomasboyt opened this issue Jan 11, 2016 · 2 comments

Comments

@thomasboyt
Copy link
Owner

would allow avoiding code like this

ReactDOM.findDOMNode(this).focus();

or this

ReactDOM.findDOMNode(this).focus();

or this

ReactDOM.findDOMNode(this).focus();

etc

@thomasboyt
Copy link
Owner Author

greena13/react-hotkeys#12 is promising in this regard

@thomasboyt
Copy link
Owner Author

react-hotkeys has an attach prop to specify DOM element to listen on: https://github.com/Chrisui/react-hotkeys/blob/master/lib/HotKeys.js#L54-L62

unclear if mousetrap supports multiple instances bound to the same element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant