NPM Resource Changed PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar adarshdubey03
adarshdubey03
26 Feb 2026

Pull Request resolves #47206 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

After closing the Batch modal in the Administrator (Articles, Modules, etc.), the Filter Options button does not open the filter panel.

Root cause:
When the Batch modal is closed, a joomla:updated event is dispatched. This re-triggers Searchtools initialization, causing duplicate click event listeners to be attached to the filter toggle button.

With two listeners attached:

First handler adds the visibility class

Second handler removes it immediately

Result: No visible change.

Fix:
Added an idempotent initialization guard in the Searchtools constructor using a dataset flag on the form element to prevent duplicate initialization when joomla:updated fires.

This ensures:

Only one listener is attached

Toggle behavior remains correct

Lifecycle remains stable during async admin updates

Testing Instructions

Go to Administrator → Content → Articles

Click Actions → Batch

Click Cancel

Click Filter Options

Repeat the same test in:

Administrator → Content → Modules

Optional console verification:

getEventListeners(document.querySelector('.js-stools-btn-filter')).click.length

Should return 1.

Actual result BEFORE applying this Pull Request

After closing the Batch modal, clicking Filter Options does nothing.

Two click listeners are attached to the filter button, causing the toggle to execute twice.

Expected result AFTER applying this Pull Request

After closing the Batch modal, clicking Filter Options correctly opens the filter panel.

Only one click listener is attached.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar adarshdubey03 adarshdubey03 - open - 26 Feb 2026
avatar adarshdubey03 adarshdubey03 - change - 26 Feb 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Feb 2026
Category JavaScript Repository NPM Change
avatar adarshdubey03 adarshdubey03 - change - 26 Feb 2026
Title
Fix duplicate Searchtools initialization after joomla:updated event
[6.1] Fix Filter Options not opening after Batch modal
avatar adarshdubey03 adarshdubey03 - edited - 26 Feb 2026
avatar brianteeman brianteeman - test_item - 26 Feb 2026 - Tested successfully
avatar brianteeman
brianteeman - comment - 26 Feb 2026

I have tested this item ✅ successfully on 13b556a

I confirm the bug and I confirm that with this change the bug is resolved.

I dont know enough js to say if its the correct solution


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

avatar krishnagandhicode krishnagandhicode - test_item - 27 Feb 2026 - Tested successfully
avatar krishnagandhicode
krishnagandhicode - comment - 27 Feb 2026

I have tested this item ✅ successfully on 13b556a


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

avatar richard67
richard67 - comment - 2 Mar 2026

@brianteeman Does the issue also happen on 5.4?

avatar brianteeman
brianteeman - comment - 2 Mar 2026

No, its a bug in 6.0

avatar richard67
richard67 - comment - 2 Mar 2026

No, its a bug in 6.0

Then the PR should have been made for 6.0-dev. But as there won't be any 6.0.x release if we don't get a surprising issue, it make no big difference if it does into 6.1.

avatar richard67 richard67 - change - 2 Mar 2026
Status Pending Ready to Commit
Labels Added: NPM Resource Changed PR-6.1-dev
avatar richard67
richard67 - comment - 2 Mar 2026

RTC


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

avatar brianteeman
brianteeman - comment - 2 Mar 2026

@richard67 the roadmap say 6.0.4 on 26 march

avatar richard67
richard67 - comment - 2 Mar 2026

@richard67 the roadmap say 6.0.4 on 26 march

@brianteeman Yes, but it might be skipped if no security fix as 2 weeks later will be 6.1.0 stable (and another 5.4.x).

Add a Comment

Login with GitHub to post a comment