diff --git a/core/modules/macros/button.js b/core/modules/macros/button.js index 62747b366..ab0e6b103 100644 --- a/core/modules/macros/button.js +++ b/core/modules/macros/button.js @@ -68,7 +68,7 @@ exports.handleEvent = function(event) { event.preventDefault(); return false; case "tw-cancel-popup": - if(this.hasParameter("popup") && !$tw.utils.domContains(this.domNode,event.targetOfCancel)) { + if(this.hasParameter("popup") && this.domNode !== event.targetOfCancel && !$tw.utils.domContains(this.domNode,event.targetOfCancel)) { this.triggerPopup(event,true); } break;