We had registered an event handler on a checkbox in table header which
would call a function, 'checkboxes', on all checkboxes within that
table. This function, in turn, causes does its work and then triggers
event handlers for all modified checkboxes which include the original
table header checkbox. This resulted in the original event calling
itself recursively.
Resolve this by only modifying the checkboxes in the table body.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 44fe7bae ("js: Allow shift-select of checkboxes")
$('#check-all').change(function(e) {
if(this.checked) {
- $('#patchlist').checkboxes('check');
+ $('#patchlist > tbody').checkboxes('check');
} else {
- $('#patchlist').checkboxes('uncheck');
+ $('#patchlist > tbody').checkboxes('uncheck');
}
e.preventDefault();
});