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

Avoid block unselection by focus leave #836

Merged
merged 3 commits into from
May 18, 2017
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented May 18, 2017

Closes #827
Closes #763

This pull request seeks to change the behavior of block selection, tracking selection by focus entering the block, but unselection only by an escape key press or click on the editor canvas (whitespace). It also resolves an issue described in #763 where the area next to the block controls was not considered outside the toolbar (8c9ba15).

Testing instructions:

Ensure that only one block can be selected at a time, either by tabbing into or clicking on the block.
Ensure that a block only becomes unselected when (a) another block becomes selected, (b) the escape key is pressed while focusing a block, or (c) the editor whitespace is clicked.

@aduth aduth added the [Feature] Blocks Overall functionality of blocks label May 18, 2017
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 👍

@aduth aduth force-pushed the update/827-block-sticky-focus branch from 8c9ba15 to 535b475 Compare May 18, 2017 17:00
@aduth
Copy link
Member Author

aduth commented May 18, 2017

Still thinking the focus flows described in #827 are a bit awkwardly defined. We may want to revisit this later as "focus moved to body" or "focus moved to canvas" as unselect intent, rather than escape/click events. I do feel this is an overall improvement though, so going to merge.

@aduth aduth merged commit f496608 into master May 18, 2017
@aduth aduth deleted the update/827-block-sticky-focus branch May 18, 2017 18:30
@jasmussen
Copy link
Contributor

Wow, impressive work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks
Projects
None yet
3 participants