-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Navigation Submenu Link: Add Open in new tab
toggle to navigation block sidebar
#70687
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 Submenu Link: Add Open in new tab
toggle to navigation block sidebar
#70687
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hi @getdave, I’ve opened a follow-up PR that adds the ‘Open in new tab’ option to the Navigation Submenu Inspector controls for consistency. Please review it at your convenience! Thank you 🙌. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
This PR works correctly just like the Navigation Link block, but I found that the "Reset all" button does not work properly:
I think we need to update here:
gutenberg/packages/block-library/src/navigation-submenu/edit.js
Lines 389 to 396 in 9bd4dd1
resetAll={ () => { | |
setAttributes( { | |
label: '', | |
url: '', | |
description: '', | |
rel: '', | |
} ); | |
} } |
The Navigation Link block will also need to be fixed in a follow-up PR.
Screen.Recording.2025-07-11.at.4.05.16.PM.movHi @t-hamano, Thank you for the feedback 🙌. I have updated the PR and fixed the issue. Please review it at your convenience. Also, will open a follow-up PR with the fix for the same for the Navigation Link block shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
…lock sidebar (#70687) * feat: Add 'Open in new tab' option to Navigation Submenu block * Set default value for opensInNewTab in NavigationSubmenuEdit Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Follow up of: #67262
What?
Adds the "Open in new tab" toggle option to the Navigation Submenu block's settings sidebar, making it accessible alongside other link settings.
Why?
Users need the ability to configure submenu links to open in new tabs. This setting was missing from the Navigation Submenu Inspector controls, creating an inconsistency with other navigation blocks.
Testing Instructions
Screencast:
Screen.Recording.2025-07-11.at.1.22.07.PM.mov