Fix legacy support of WCF.Clipboard
authorMatthias Schmidt <gravatronics@live.com>
Sun, 13 Nov 2016 13:31:44 +0000 (14:31 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 13 Nov 2016 13:33:25 +0000 (14:33 +0100)
wcfsetup/install/files/js/WCF.js

index a21645a343c3759a683bd349da0963cabd986995..8d370fd93a0636bbd1f2b8e458eb4e4d18434902 100755 (executable)
@@ -1323,6 +1323,11 @@ WCF.Clipboard = {
                                if (actionObjects.hasOwnProperty(type)) {
                                        (function (type) {
                                                EventHandler.add('com.woltlab.wcf.clipboard', type, function (data) {
+                                                       // only consider events if the action has been executed
+                                                       if (data.responseData === null) {
+                                                               return;
+                                                       }
+                                                       
                                                        if (actionObjects[type].hasOwnProperty(data.responseData.actionName)) {
                                                                actionObjects[type][data.responseData.actionName].triggerEffect(data.responseData.objectIDs);
                                                        }