-
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
Editing newly created Nav Link text using sidebar causes focus to move to previous link item #68035
Comments
What we actually want to do here is not micro manage the focus if the close is in the sidebar. We could do this by adding a state to track if the focus is in the inspector controls but I"m wondering if thats a bit heavy handed. |
I think @alexstine was working on something similar. See #61374. |
Thank you. I'm glad to see a more detailed solution is/was in the works. However, that effort seems to have totally stalled and has a number of potential knock on effects. I wonder whether shipping #68044 as a "hotfix" for Navigation and then looking again at #61374 would be a compromise folks would be happy with in order to this bug fixed for users of WordPress in the short term? |
tl;dr: There's a deeper issue here. The hotfixes we've added to cover the root issue are causing the problem, so let's fix the root issue. The code causing this issue is a hotfix covering a deeper issue that @ajlende and I are looking at: The block list appender doesn't receive focus when the quick inserter closes. We've figured out it's due to the I'm hopeful we can figure out a solution of either:
|
Absolutely. It seems there are several interconnecting streams here. I'd much rather avoid "hotfixes" but by the same token I'd rather not see WP 6.8 land with this bug still in evidence. Let's see how we're faring at Beta 1. Thanks for all the efforts around this. |
Hopefully we can have a PR up this week that helps remove these hotfixes. |
It doesn't fix this issue, but I think we can build off it to fix this issue properly. Needs review: #68060 |
Description
When creating a new Navigation link item you may wish to amend the label text using the block's sidebar controls. However, when you do so the focus is placed back on the previous Navigation item.
It's hard to explain so please watch the video to understand.
Step-by-step reproduction instructions
/
.Text
field in the sidebar controlsThe culprit is almost certainly this line
gutenberg/packages/block-library/src/navigation-link/edit.js
Lines 601 to 604 in cddf656
...which was added in 0cea924
Screenshots, screen recording, code snippet
Screen.Capture.on.2024-12-16.at.17-35-26.mp4
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.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: