Skip to content
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: Current menu item and ancestor class inconsistent application #50069

Closed
webmandesign opened this issue Apr 25, 2023 · 1 comment · Fixed by #67169
Closed
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Block] Submenu Affects the Submenu Block - for submenus in navigation [Feature] Navigation Menus Any issue relating to Navigation Menus [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@webmandesign
Copy link
Contributor

Description

In Navigation block the current-menu-item class is being applied on the menu li tag. However, the current-menu-ancestor class is being applied on li > a tag.

Please fix the application of current-menu-ancestor class and apply it onto the parent li tag, not the anchor tag.

Step-by-step reproduction instructions

Set a Navigation menu block with submenus and visit a page from the submenu. Inspect the classes applied on the Navigation block list items.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.2, Gutenberg 15.6.2

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

@carolinan carolinan added [Block] Navigation Affects the Navigation Block [Block] Submenu Affects the Submenu Block - for submenus in navigation labels Apr 26, 2023
@jordesign
Copy link
Contributor

I've confirmed this behaviour in testing.

Screenshot 2023-07-20 at 11 37 37 am

@jordesign jordesign added [Type] Bug An existing feature does not function as intended [Feature] Navigation Menus Any issue relating to Navigation Menus labels Jul 20, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Block] Submenu Affects the Submenu Block - for submenus in navigation [Feature] Navigation Menus Any issue relating to Navigation Menus [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants