User tests: Successful: Unsuccessful:
Pull Request resolves #47206 .
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
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.
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.
After closing the Batch modal, clicking Filter Options correctly opens the filter panel.
Only one click listener is attached.
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
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Repository NPM Change |
| Title |
|
||||||
I have tested this item ✅ successfully on 13b556a
@brianteeman Does the issue also happen on 5.4?
No, its a bug in 6.0
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.
| Status | Pending | ⇒ | Ready to Commit |
| Labels |
Added:
NPM Resource Changed
PR-6.1-dev
|
||
RTC
@richard67 the roadmap say 6.0.4 on 26 march
@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).
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.