From ac38267350254b4a682d245a8545fece33677897 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 3 Jan 2021 15:41:14 +0100 Subject: [PATCH] Fix mark all-checkbox being temporarily checked after checking individual checkbox --- .../install/files/js/WoltLabSuite/Core/Controller/Clipboard.js | 2 +- .../install/files/ts/WoltLabSuite/Core/Controller/Clipboard.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.20.1