Fix mark all-checkbox being temporarily checked after checking individual checkbox
authorMatthias Schmidt <gravatronics@live.com>
Sun, 3 Jan 2021 14:41:14 +0000 (15:41 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 3 Jan 2021 14:41:14 +0000 (15:41 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js
wcfsetup/install/files/ts/WoltLabSuite/Core/Controller/Clipboard.ts

index 8d0fcbc65383bfcdd4b8bc7b8829f89b84abeb69..e2544126b83b63b5161a78a1144f04acbbace71a 100644 (file)
@@ -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);
index de703b4b2e934b4613b962df170da744a88dfc7e..5806eda37422a2376adcb54e04fc54a33b73fed7 100644 (file)
@@ -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);
     }