-
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: overlay menu closes automatically when hovering menu items linked to drafts that follow a submenu item #60048
Comments
Finally had time and I can replicate with 6.5 RC3. This feels major @getdave @youknowriad @fabiankaegy You can replicate by spinning up a site here https://app.instawp.io/launch?t=beta-rc&d=v2 and setting the menu to display mobile always. |
Were you able to check whether this is a new bug in 6.5 or something that pre-existed? |
I just tested on WP 6.4.3 base install and I was not able to recreate the issue. So, something new in 6.5. In 6.4.3 the draft item is not even displayed on the front end in the navigation, which seems ideal to me. |
On a site with the Meraki theme, I found a case in which the link to the draft page is inside the submenu, not after it. |
At this point in the release, it might have to be fixed in a patch release though. |
Does the draft render on the front end? We to my knowledge do not render links to draft posts. |
I think the issue is more about the menu closing automatically rather than the draft displaying. |
But I can't repro because for me the draft links don't render. And in the editor the overlay does not close automatically. |
But I can't repro because for me the draft links don't render. And in the editor the overlay does not close automatically. @draganescu The draft doesn't render for me either, as expected. The problem happens when the cursor reaches the draft item position, as shown in the video. |
Ohh 😂 I didn't see that in the video! I'll try again 🙇🏻 |
@liviopv what am I not doing? draft-doesnt-close.mp4 |
@draganescu before the draft item, you need to have a menu item with a submenu, like this structure:
|
Apparently I flopped reading comprehension today :D will test again! |
Yes I can confirm this. |
The problem manifests for any submenu - the presence of a draft link is not required - and it is happening because there is some bad interference between the code that closes submenus and the code that closes the overlay. |
I really hope we can fix this before the release goes out. I tested the above and it fixed it for me but would appreciate a lot more reviews. I'll flag in Make Test :) cc @fabiankaegy @colorful-tones in case you all can help out too. |
@annezazu I tested out the PR and the added fix works as expected. 👍🏻 Test ReportDescriptionThis report validates whether the indicated PR works as expected. PR : Fix self closing navigation overlay Environment
Actual Results
Additional NoteTested with WordPress Playground Supplemental ArtifactsAdd as Attachment Please check this visual attached below. Fix.self.closing.navigation.overlay.mov |
Description
Edge case: When a site has a draft page linked to a menu item and that menu item is positioned after a submenu in a Navigation Block, the overlay will automatically close without user input.
Step-by-step reproduction instructions
** Submenu item
** Submenu item
Screenshots, screen recording, code snippet
CleanShot.2024-03-20.at.15.30.33.mp4
Example menu structure:
Environment info
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: