-
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
Navigation block not focused on setup #39301
Comments
Thanks for reporting 👍 |
Related to #37934 ? |
Hello @getdave @youknowriad. I have been trying to debug this issue in order to fix it. I've noticed that after the new navigation menu is created here
So, I have tried setting the focus to the navigation block by doing
But this seems to have no effect. Do you have an idea about why (and where) the focus is moved to |
I'd suggest that the item that is currently focused is probably temporarily being removed from the DOM during a loading state. This might cause the focus to jump back to the document body in lieu of the previously focused element no longer being present. Bear in mind this may happen very quickly on powerful devices with good internet connections so we'll need to think carefully about how/why it's occuring. |
@getdave Just circling back to see if this issue might be able to be moved along – thanks! |
Thanks for the followup @kathrynwp 👍 The UX of the block has now been changed so that |
@tellthemachines just a quick ping to see if this one is sufficiently resolved for us to close it? |
Seems to be resolved. |
Description
When adding a block that doesn't immediately contain a text area, the block wrapper is focused. See for example Group or Columns block: add a Group, note that focus is on the block wrapper, and pressing Tab or Arrow down once transfers focus to the block inserter inside.
With the, Navigation block, clicking "Start empty" should move focus to the block wrapper as well, but that's not happening: focus is lost (
document.activeElement
returns the document body). Tab will move it to the block wrapper, but this is inconsistent with how other blocks behave so can cause confusion.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.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: