No Code Attached Yet
avatar emmettculley
emmettculley
5 Feb 2026

I joomla 5 and below, when you expand a menu dropdown, clicking anywhere outside the dropdown list causes the list to collapse. On Joomla 6 that does not happen. I trace the issue to the templates js/mod_menu/menu-metismenu.js file.

I fixed it by changing the only code in that file to:

document.querySelectorAll('ul.mod-menu_dropdown-metismenu').forEach(menu => {
const mm = new MetisMenu(menu, {
triggerElement: 'button.mm-toggler'
}).on('shown.metisMenu', event => {
window.addEventListener('click', function mmClick(e) {
if (!event.target.contains(e.target)) {

    mm.element.addEventListener('metisMenu', () => {

      window.removeEventListener('click', mmClick);
    });
    mm.hide(event.detail.shownElement);
  }
});

});
});

Note the line with 'mm.element.addEventListener'

Before the fix that line had: 'mm.addEventListener', caused a javascript error.

Now I need to find a way to meke is stick after a update.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar emmettculley emmettculley - open - 5 Feb 2026
avatar emmettculley emmettculley - change - 5 Feb 2026
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 5 Feb 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Feb 2026
avatar drmenzelit
drmenzelit - comment - 6 Feb 2026

Can you create a pull request with your fix?

avatar emmettculley
emmettculley - comment - 6 Feb 2026

I'll do that.

avatar emmettculley
emmettculley - comment - 7 Feb 2026

I've cloned the git hub repo, but am not able to get the site to work when checking out 6.0-dev or 6.1-dev branches.

Is there another branch I should checkout that will actually work?

In 6.0-dev I am seeing this javaseript error:

Uncaught TypeError: Joomla.getOptions is not a function
at HTMLDocument. (template.js?0802d4b2087328136301cf936e4a399d:255:29)
(anonymous) @ template.js?0802d4b2087328136301cf936e4a399d:255Understand this error

and in both 6.1-dev and 6.1.dev in the file libraries/src/Language/Text.php I am see this call to Factory::getLanguage fail.

public static function sprintf($string)
{
return 'some text';
$lang = Factory::getLanguage();
$args = \func_get_args();
$count = \count($args);

The php errors cause a 500 error.

The javascrptp error prevents the initial installation page loading. Only the header and footer show.

avatar emmettculley
emmettculley - comment - 7 Feb 2026

Don't see how I can submit a PR until I can repeat the error locally and verify my fix does resolve the issue.

avatar joomdonation
joomdonation - comment - 7 Feb 2026

@emmettculley After cloning the repo, there are several commands you need to run like composer install, npm ci to have it works. Please see https://github.com/joomla/joomla-cms?tab=readme-ov-file#how-to-get-a-working-installation-from-the-source for instructions (honestly, I haven't tried that myself, just see it from instructions)

The easiest option would be download and install the nightly build package https://developer.joomla.org/nightly-builds.html and see if you can replicate the error locally and verify your fix

avatar emmettculley
emmettculley - comment - 7 Feb 2026

I ran composer install and npm ci in both branches before attemtping to access the site.

I'll do as you suggest and get the nightly build.

avatar emmettculley
emmettculley - comment - 7 Feb 2026

The nightly build 6.0.3-rc2 package does not contain composer.json or package.json files, nor does it contain the /vendor directory created by composer install. So not possible to access via the webserver on order to debug.

However, I found that the js file I fixed on my live site is different in the 6.0-dev branch than the one that was on my live site. I exchanged my file with the one on the 6.0-dev branch and the menu works as it did with my fix.

I am assuming that the issue has been fixed and will show up in the next update.

Thanks for your responses.

avatar chmst
chmst - comment - 7 Feb 2026

#46669 should be fixed with this PR

avatar emmettculley
emmettculley - comment - 7 Feb 2026

That PR seems to be for 5.4. Can I assume it will get into the next version 6 release?

avatar brianteeman
brianteeman - comment - 7 Feb 2026

yes it has been merged in to j6 as well

avatar emmettculley
emmettculley - comment - 9 Feb 2026

Thanks. I finally did get 6.0-dev to install. It has me at 6.0.3. Should be ready to create a PR, if I ever get to fix something before you do :-)

avatar coolcat-creations
coolcat-creations - comment - 12 Feb 2026

@tecpromotion can we close it as the fix is merged?

avatar drmenzelit drmenzelit - close - 12 Feb 2026
avatar drmenzelit
drmenzelit - comment - 12 Feb 2026

Closing as we have a fix

avatar drmenzelit drmenzelit - change - 12 Feb 2026
Status New Closed
Closed_Date 0000-00-00 00:00:00 2026-02-12 16:16:38
Closed_By drmenzelit

Add a Comment

Login with GitHub to post a comment