From: Matthias Schmidt Date: Sun, 3 Jan 2021 14:41:14 +0000 (+0100) Subject: Fix mark all-checkbox being temporarily checked after checking individual checkbox X-Git-Tag: 5.4.0_Alpha_1~493 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac38267350254b4a682d245a8545fece33677897;p=GitHub%2FWoltLab%2FWCF.git Fix mark all-checkbox being temporarily checked after checking individual checkbox --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js index 8d0fcbc653..e2544126b8 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js @@ -201,7 +201,7 @@ define(["require", "exports", "tslib", "../Ajax", "../Core", "../Dom/Change/List clipboardObject.classList.remove("jsMarked"); } if (data.markAll !== null) { - data.markAll.checked = Array.from(data.checkboxes).some((item) => !item.checked); + data.markAll.checked = !Array.from(data.checkboxes).some((item) => !item.checked); this.setParentAsMarked(data.markAll, isMarked); } this.setParentAsMarked(checkbox, checkbox.checked); diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Controller/Clipboard.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Controller/Clipboard.ts index de703b4b2e..5806eda374 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Controller/Clipboard.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Controller/Clipboard.ts @@ -282,7 +282,7 @@ class ControllerClipboard { } if (data.markAll !== null) { - data.markAll.checked = Array.from(data.checkboxes).some((item) => !item.checked); + data.markAll.checked = !Array.from(data.checkboxes).some((item) => !item.checked); this.setParentAsMarked(data.markAll, isMarked); }