From 4165cb8bd7265010af821c4d3b09dba56be80113 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 19 Jul 2016 15:12:51 +0200 Subject: [PATCH] Fixed page action for clipboard objects --- .../files/js/WoltLab/WCF/Controller/Clipboard.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js index 1568b3187f..c467e760ee 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js @@ -469,7 +469,7 @@ define( } // rebuild editors - var created, dropdown, editor, typeData; + var actionName, created, dropdown, editor, typeData; var divider, item, itemData, itemIndex, label, unmarkAll; //noinspection JSUnresolvedVariable for (typeName in data.returnValues.items) { @@ -537,7 +537,14 @@ define( dropdown.appendChild(unmarkAll); if (keepEditors.indexOf(typeName) !== -1) { - UiPageAction.add('wcfClipboard-' + typeName, editor); + actionName = 'wcfClipboard-' + typeName; + + if (UiPageAction.has(actionName)) { + UiPageAction.show(actionName); + } + else { + UiPageAction.add(actionName, editor); + } } if (created) { -- 2.20.1