From ea6bb6519f3bf4398ebdf0f6196211c56f0b24ae Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 7 Oct 2018 10:58:41 +0200 Subject: [PATCH] Fixed clipboard issue --- .../WoltLabSuite/Core/Controller/Clipboard.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js index 1be78855e6..ad1e1eeb03 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js @@ -130,21 +130,21 @@ define( if (containerData === undefined) { var markAll = elBySel('.jsClipboardMarkAll', container); - if (markAll.matches(_specialCheckboxSelector)) { - var label = markAll.closest('label'); - elAttr(label, 'role', 'checkbox'); - elAttr(label, 'tabindex', '0'); - elAttr(label, 'aria-checked', false); - elAttr(label, 'aria-label', Language.get('wcf.clipboard.item.markAll')); - - label.addEventListener('keyup', function (event) { - if (event.keyCode === 13 || event.keyCode === 32) { - checkbox.click(); - } - }); - } - if (markAll !== null) { + if (markAll.matches(_specialCheckboxSelector)) { + var label = markAll.closest('label'); + elAttr(label, 'role', 'checkbox'); + elAttr(label, 'tabindex', '0'); + elAttr(label, 'aria-checked', false); + elAttr(label, 'aria-label', Language.get('wcf.clipboard.item.markAll')); + + label.addEventListener('keyup', function (event) { + if (event.keyCode === 13 || event.keyCode === 32) { + checkbox.click(); + } + }); + } + elData(markAll, 'container-id', containerId); markAll.addEventListener(WCF_CLICK_EVENT, this._markAll.bind(this)); } -- 2.20.1