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: Submenu additional class duplication #36464

Closed
jacobcassidy opened this issue Nov 13, 2021 · 1 comment · Fixed by #36478
Closed

Navigation Block: Submenu additional class duplication #36464

jacobcassidy opened this issue Nov 13, 2021 · 1 comment · Fixed by #36478
Assignees
Labels
[Block] Submenu Affects the Submenu Block - for submenus in navigation [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@jacobcassidy
Copy link

Description

When adding a class to a submenu block under "Advanced", it gets duplicated in the HTML twice. If you add multiple classes, they all get duplicated twice.

Step-by-step reproduction instructions

  1. In the Editor, add a submenu block
  2. Add a class for the submenu block in Advanced > Additional CSS class(es)
  3. Save your page
  4. Go to the live page and inspect the submenu block
  5. Notice the additional class(es) you added are inserted twice.

Screenshots, screen recording, code snippet

Add class called test-submenu
Add class to submenu

Check live page HTML for duplication of class:
HTML class duplication

Environment info

  • WP v5.8.2
  • Glutenberg v11.9.0
  • Chrome v95
  • macOS

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

@tellthemachines tellthemachines added [Block] Submenu Affects the Submenu Block - for submenus in navigation [Type] Bug An existing feature does not function as intended labels Nov 15, 2021
@tellthemachines tellthemachines added this to 📥 To do in Navigation block via automation Nov 15, 2021
@talldan talldan added this to 📥 To do in WordPress 5.9 Must-Haves via automation Nov 15, 2021
@talldan
Copy link
Contributor

talldan commented Nov 15, 2021

Looks like this should be a pretty simple fix. It has already been fixed in the navigation link block in #35634 by deleting some code.

It should be possible to do the same in the submenu block.

@talldan talldan added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Nov 15, 2021
@talldan talldan self-assigned this Nov 15, 2021
@talldan talldan removed the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Nov 15, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 15, 2021
Navigation block automation moved this from 📥 To do to ✅ Done Nov 16, 2021
WordPress 5.9 Must-Haves automation moved this from 📥 To do to ✅ Done Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Submenu Affects the Submenu Block - for submenus in navigation [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
3 participants