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

Make the navigateRegions shortcuts work from anywhere. #6144

Merged
merged 1 commit into from
Apr 16, 2018

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Apr 12, 2018

This PR simply adds the prop bindGlobal to the navigable regions keyboard shortcuts (Ctrl+backtick) to make them work also from the contenteditable areas, input fields, and textareas.

Keyboard users would greatly benefit from being able to jump through the main editor region at any moment. For example, when editing a paragraph they can now jump to the sidebar and enable the drop cap. This wasn't possible before because tabbing away from the paragraph selected another block.

Reference:
https://craig.is/killing/mice#api.bind.text-fields
https://github.com/ccampbell/mousetrap/tree/master/plugins/global-bind

Fixes #5847

@afercia
Copy link
Contributor Author

afercia commented Apr 13, 2018

This is very similar to #6149 and just adds the bindGlobal prop. I'd appreciate a very quick review when you have a chance 🙂

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@afercia afercia merged commit bd0d2f6 into master Apr 16, 2018
@afercia afercia deleted the update/navigableregions-global-shortcuts branch April 16, 2018 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants