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
Press Esc twice to deselect all blocks #47172
Comments
Just cross posting a comment from #48708 (comment) for visibility — what if instead of having to press Escape twice to trigger deselection we tried something like the following:
With the above, we'd still have the press Escape twice to deselect behaviour when only a single block is selected in the editor canvas, but also make it quicker to deselect when a user is already working with a selection. Would that make it easier, or does it just over complicate things? 🤔 |
That sounds pretty good to me, let's try it! I would add that we can explore as an addon, depending on necessity, to have Esc when in select mode fall back to Edit mode, essentially making Esc a toggle. Still adherent to the above heuristic. |
Thanks for confirming! I'll have a play and see how difficult it is / how it might work. Will ping when I have a PR ready! |
I've opened up a PR to explore allowing Escape to deselect a multiselection over in #48904. It was pretty easy to add the behaviour back in, but I think we might want to get some feedback from @ellatrix on the approach, as from the looks of it, allowing Escape to switch to Navigation mode during a multiselection might have been an intentional feature. From my perspective, allowing Escape to deselect both the block and range selection is a bit more intuitive, but I'm not a big user of navigation mode, so keen to hear what others think, too. |
Assuming that focus is handled when deselecting, this would also enable us to close out #5524. Would love to get some of those old a11y issues closed out! |
I'd really love to have a single press of |
I've given #48904 a rebase, so that it now returns the user to the beginning of the selection when clearing a multi-selection by pressing Escape. Ready for testing! 🙂 |
Deselecting blocks is an important aspect of previewing your content. Right now it's not as simple as it should be — clicking a blank space in the canvas, or clicking in the breadcrumbs. See also #36535.
In many editors, pressing the Escape key deselects. In the block editor, this currently invokes "select mode", which makes blocks quick to navigate using the keyboard, easy to delete, and invokes "clickthrough" for nested blocks. Pressing Escape again does deselect blocks, but it stays in select mode, which causes a scroll-jump, shown in this GIF:
Furthermore, it isn't entirely clear how to exit select mode (which you do by clicking a block twice, or clicking a block and pressing Enter).
Should pressing Escape twice deselect blocks, and return to edit mode? It would make sense, since edit mode is the default mode after all, so the second keypress would essentially work as a "select the default editing tool". I suspect this would greatly improve the writing flow, and bring back the escape hatch / reset feel of pressing Escape.
The text was updated successfully, but these errors were encountered: