update toggle-state after release/pointerup instead of during updateSelection

This commit is contained in:
Richard Schreiber
2021-02-22 18:16:46 +01:00
parent 8a169d0496
commit 1bfa4c6fda
@@ -707,8 +707,6 @@ $(function () {
if (!checkbox.hasAttribute("data-inital")) checkbox.setAttribute("data-inital", checkbox.checked); if (!checkbox.hasAttribute("data-inital")) checkbox.setAttribute("data-inital", checkbox.checked);
if (checked === undefined || checked === null) checkbox.checked = checkbox.getAttribute("data-inital") === "true"; if (checked === undefined || checked === null) checkbox.checked = checkbox.getAttribute("data-inital") === "true";
else checkbox.checked = checked; else checkbox.checked = checked;
$(checkbox).trigger("change");
} }
}; };
var onChangeSelection = function(ev) { var onChangeSelection = function(ev) {
@@ -753,6 +751,8 @@ $(function () {
ev.preventDefault(); ev.preventDefault();
onChangeSelectionHappened = false; onChangeSelectionHappened = false;
$checkboxes.removeAttr("data-inital"); $checkboxes.removeAttr("data-inital");
update();
} }
$rows.off("pointerenter", onChangeSelection); $rows.off("pointerenter", onChangeSelection);
}); });