-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Prevent focus loss when deleting all blocks #9626
Comments
As far as implementation, the obvious path seems to be that when the last block is removed, we insert and focus the default block. However, this raises a few questions:
|
That is an interesting point.
I like this. A Plan B could be to set focus on the title block instead. A plan C could be to set focus on the editing canvas, so a single press of Tab sets focus on the title. Right now focus is on
Depends? I think the key is to ensure focus is set on a sensible place when a block is deleted. Could be the preceeding block, which suggests focus could be set on the title if all blocks are deleted. |
Extracted from #8961 (comment).
Problem: If you delete all blocks on a post or page, focus is lost.
Steps to reproduce:
Notice how focus is lost (it's actually on the
body
element).Propost solution:
When all blocks are deleted, simply set focus on the first appender:
CC: @talldan
The text was updated successfully, but these errors were encountered: