-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[6.1] Fix default menu layout - submenu stay open on page load #46397
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
base: 6.1-dev
Are you sure you want to change the base?
[6.1] Fix default menu layout - submenu stay open on page load #46397
Conversation
* [6.0] README.md delete heavy development note * Also clean heavy development note in README.txt
|
I have tested this item ✅ successfully on f231e7a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46397. |
|
I have tested this item ✅ successfully on f231e7a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46397. |
|
Place for documentation: https://docs.joomla.org/J4.x:Submenus (?) |
Thank you @ceford 💚 |
|
I have tested this item ✅ successfully on f231e7a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46397. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46397. |
|
More a feature than a bug fix, rebased to 6.1. Thanks @LadySolveig for addressing this issue so quickly |
Pull Request for Issue #46364 .
Summary of Changes
Introduce a new class (nav-active-open) for the default menu, allowing control over whether submenus are opened automatically on page load for the active menu item.
Caution
This functionality should not be activated by default without an additional class for all default menus, as it may not be desirable in various other module positions.

Example - Cassiopeia menu position
Additionally updated the
toggleSubMenumethod to use optional chaining when setting thearia-expandedattribute, preventing errors if the target element is missing.Testing Instructions
sidebar-rightDefaultStep 1
Help -> WorkflowsStep 2
nav-active-openHelp -> WorkflowsImportant
For this to test an update of the media asset is required, please use the prebuilt packages or run npm install.
menu-fix.mp4
Actual result BEFORE applying this Pull Request
Should always be collapsed - with and without the class.
Expected result AFTER applying this Pull Request
Step 1
Submenu with menu entry
Workflowsshould be always collapsed (without the class).Step 2
Submenu with menu entry
Workflowsshould stay open on new page load ifWorkflowis the current active item (with class set).Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
This pull request enhances the menu component's accessibility and behavior by adding a new setting to control submenu state on page load and improving error handling. The most important changes are grouped below: