-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Focus the default block after it gets added at the end of the canvas #65849
Comments
Thanks for opening the issue. I was about to report on the same thing. However, in my experience this only happens when the editor iframe is not present. Can you confirm? I.e. it does work if the canvas is in the iframe. |
This comment has been minimized.
This comment has been minimized.
@stokesman thanks for looking into this. For me, this happens with the editor iframed as well.
GIF to illustrate: |
Thanks Andrea 🙇, I hadn’t been seeing it in the iframed editor because when I noticed it I was on an older branch and forgot to check latest trunk.
|
Still pretty stumped on this but from testing it was working in 6.6.1 and broken in 6.6.2. It is currently broken in 6.7 beta. I'm not sure if that qualifies it for fixing it in 6.7 at this phase of the release cycle. |
I take it you mean the changes reverted by that commit had been a fix. It’s what I thought too. To test, I checked out the reverted commit’s parent 609a3c8 and found focus worked there. Because of that (and the fact that focus was never actually handled by the padding appender hook) it makes me suspect that the revert wasn’t a perfect reversal. I could be missing something though. Aki, do you have a clear idea about possibility of getting this fixed for 6.7? I wasn’t sure if it qualifies due to it having not been introduced by 6.7. I would nice to, but if not, I guess it can be in a minor release. |
I think I’ve figured this out but it’s EOD for me so I’ll finish confirming it tomorrow and see about a PR then. |
To sum it up succinctly, the revert d9551aa only regressed this because the padding appender hook had also changed. That revert meant the padding appender’s changes needed a partial revert. A little more detail is in the PR I linked to fix this. |
Description
When clicking the empty area at the end of the canvas, the default block (a paragraph) gets added. However, the new added block is not selected. As such, it doesn't get focus. As a user, to start using the new block or the 'slash inserter' I have to click again the editable part of the new block. Animated GIF to illustrate:
I'm not sure whether there are reasons to not select and move focus the default block but the current behavior seems inefficient to me and there's room to improve usability and accessibility. As an user, I don't want to click twice. I just want to click and start typing.
I may be missing something but if there are no side effects on other flows, keyboard operability and such, I'd say that one click less would be a quick win to provide some better user experience.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: