Native change event listeners don't work when triggered from jQuery

Created on 11 August 2025, 4 days ago

Problem/Motivation

When using "tableselect" "Select all" checkbox, jQuery change events are triggered. However, if you implement native event listeners on the checkboxes, the change event is never triggered.

https://stackoverflow.com/questions/40915156/listen-for-jquery-event-wit...

The short answer is that this is impossible as jQuery provides an event layer over vanilla JS. That means that vanilla JS cannot talk to that added layer.

So in summary, jQuery can catch vanilla JS events, but vanilla JS cannot catch jQuery added events.

Steps to reproduce

Reproducible in πŸ› Updating commit message when changing credits isn't working when changing it for all authors Active
We have (input is a native js selector for the checkbox):

         input.addEventListener('change', (event) => {
            ...
          });

And that code never triggers when clicking the "Select all" checkbox.

Proposed resolution

Trigger a vanilla JS change event as both native and jQuery will be able to listen to it.

Remaining tasks

MR

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

javascript

Created by

πŸ‡ͺπŸ‡ΈSpain fjgarlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024