Skip to content

Conversation

@LadySolveig
Copy link
Contributor

Pull Request for Issue #46364 .
Replacement for #46397 (same code that is tested, but moved to previous branch)

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

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-6.0-dev labels Nov 10, 2025
@Bodge-IT Bodge-IT added this to the Joomla! 6.0.1 milestone Nov 10, 2025
@Bodge-IT Bodge-IT self-requested a review November 10, 2025 22:44
Copy link
Contributor

@Bodge-IT Bodge-IT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code not technically changed from previous tested code

@Bodge-IT Bodge-IT added the RTC This Pull Request is Ready To Commit label Nov 10, 2025
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 10, 2025
@softforge softforge merged commit 58b6461 into joomla:6.0-dev Nov 10, 2025
42 checks passed
@softforge
Copy link
Contributor

Thank you @LadySolveig and the testers from the previous PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NPM Resource Changed This Pull Request can't be tested by Patchtester PR-6.0-dev

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants