Skip to content

Commit

Permalink
Merge pull request #1470 from scireum/feature/mko/OX-11093-2
Browse files Browse the repository at this point in the history
SelectableTable - Fixes an issue with checkboxes still being checked after refresh in FireFox
  • Loading branch information
mko-sci authored Oct 24, 2024
2 parents 926c202 + c47c1fe commit f4eda75
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
sirius.ready(function () {
// FireFox Fix: If a checkbox has been checked and someone refreshes the page, that checkbox is still checked
// without triggering a change event. Therefore, we are manually clearing all checkboxes on page load.
document.querySelectorAll('.select-table-row-checkbox-js:checked').forEach(function (_checkbox) {
_checkbox.checked = false;
});
document.querySelectorAll('.select-all-visible-table-rows-checkbox-js:checked').forEach(function (_selectAllCheckbox) {
_selectAllCheckbox.checked = false;
});

document.querySelectorAll('.select-all-visible-table-rows-checkbox-js').forEach(function (_selectAllCheckbox) {
const _table = _selectAllCheckbox.closest('table');
// Handle changing the state of the select-all checkbox found in the table head row

0 comments on commit f4eda75

Please sign in to comment.