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

Toolbar: Return focus to selection when escape pressed #5551

Merged
merged 3 commits into from
Mar 14, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Mar 10, 2018

Closes #5501 (#5501 (comment))

This pull request seeks to update the behavior of pressing enter within the toolbar (both contextual and pinned to top) to return focus to the current window selection, if one exists.

This also removes the global escape-to-deselect-block behavior, which is already inconsistently applied, and where it is applied is usually not expected (e.g. without its removal, pressing escape here would deselect the block). This is still useful for clearing the current multi-selection, at least until #5548 and/or #5523 can be resolved. Partially restored (for multi-selection) in b4e6780.

Testing instructions:

Verify that when pressing escape within a toolbar, both contextual and pinned to top, that focus is returned to the selected text. The pinned toolbar can be focused by pressing Alt+F10 while a selection is made within a block.

This doesn't apply in most text fields, and where it does apply is often unexpected (e.g. contextual toolbar)
@aduth aduth added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Mar 10, 2018
@aduth aduth requested a review from afercia March 10, 2018 19:36
@aduth aduth merged commit 4bac4fe into master Mar 14, 2018
@aduth aduth deleted the improve/block-toolbar-escape branch March 14, 2018 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [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.

Impossible to make the formatting toolbar appear after Escape has been pressed
1 participant