RTC NPM Resource Changed bug PR-6.0-dev PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar LadySolveig
LadySolveig
2 Nov 2025

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.

grafik grafik

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
grafik

Additionally updated the toggleSubMenu method to use optional chaining when setting the aria-expanded attribute, preventing errors if the target element is missing.

Testing Instructions

  • Install Blog-Sample-Data
  • Move the Main Menu Blog module to position sidebar-right
  • Switch the layout to Default

Step 1

  • Open site in frontend and select submenu entry Help -> Workflows

Step 2

  • Edit Main Menu Blog module - add class nav-active-open
  • Open site in frontend and select submenu entry Help -> Workflows

Important

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 Workflows should be always collapsed (without the class).
Step 2
Submenu with menu entry Workflows should stay open on new page load if Workflow is 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:

avatar LadySolveig LadySolveig - open - 2 Nov 2025
avatar LadySolveig LadySolveig - change - 2 Nov 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2025
Category JavaScript Repository NPM Change
avatar bembelimen bembelimen - test_item - 2 Nov 2025 - Tested successfully
avatar bembelimen
bembelimen - comment - 2 Nov 2025

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.

avatar ceford ceford - test_item - 2 Nov 2025 - Tested successfully
avatar ceford
ceford - comment - 2 Nov 2025

I have tested this item ✅ successfully on f231e7a

It works as described but I think it needs some documentation somewhere. Otherwise, how is anyone supposed to know that a style statement is needed to activate the behaviour?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46397.

avatar ceford
ceford - comment - 2 Nov 2025

Place for documentation: https://docs.joomla.org/J4.x:Submenus (?)

avatar LadySolveig
LadySolveig - comment - 2 Nov 2025

Place for documentation: https://docs.joomla.org/J4.x:Submenus (?)

Thank you @ceford 💚
Once it has been finally decided whether this is the right way to go, I will of course be happy to document it. Thank you for finding the right place.

avatar exlemor exlemor - test_item - 2 Nov 2025 - Tested successfully
avatar exlemor
exlemor - comment - 2 Nov 2025

I have tested this item ✅ successfully on f231e7a

I was able to test this successfully :) (thanks @LadySolveig for the Layout: Default) hint...


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46397.

avatar LadySolveig LadySolveig - change - 2 Nov 2025
The description was changed
avatar LadySolveig LadySolveig - edited - 2 Nov 2025
avatar LadySolveig LadySolveig - change - 2 Nov 2025
The description was changed
avatar LadySolveig LadySolveig - edited - 2 Nov 2025
avatar richard67 richard67 - change - 2 Nov 2025
Status Pending Ready to Commit
Labels Added: NPM Resource Changed bug PR-6.0-dev
avatar richard67
richard67 - comment - 2 Nov 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46397.

avatar Bodge-IT
Bodge-IT - comment - 5 Nov 2025

More a feature than a bug fix, rebased to 6.1. Thanks @LadySolveig for addressing this issue so quickly

avatar Bodge-IT Bodge-IT - change - 5 Nov 2025
Title
[6.0] Fix default menu layout - submenu stay open on page load
[6.1] Fix default menu layout - submenu stay open on page load
avatar Bodge-IT Bodge-IT - edited - 5 Nov 2025
avatar joomla-cms-bot joomla-cms-bot - change - 5 Nov 2025
Category JavaScript Repository NPM Change Repository Administration com_banners com_categories com_contact com_content com_contenthistory com_fields com_finder com_installer com_joomlaupdate com_menus com_modules com_newsfeeds com_plugins com_redirect com_templates com_users JavaScript NPM Change Front End
avatar tecpromotion tecpromotion - change - 6 Nov 2025
Labels Added: RTC PR-6.1-dev

Add a Comment

Login with GitHub to post a comment