From 72e7f67904ad3b011486ea0dc72cea0b923f1d36 Mon Sep 17 00:00:00 2001 From: Alessandro Francesconi Date: Wed, 22 Apr 2015 18:25:40 +0200 Subject: [PATCH] Fire "cancel" event instead of "hide" When a toolbar dialog gets closed by pressing the relative button on the toolbar menu, fire "cancel" event instead of "hide" in order to activate a previously registered "cancel:dialog" callback. --- src/toolbar/dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toolbar/dialog.js b/src/toolbar/dialog.js index 2d419fe..7b90458 100644 --- a/src/toolbar/dialog.js +++ b/src/toolbar/dialog.js @@ -190,7 +190,7 @@ this.elementToChange = null; dom.removeClass(this.link, CLASS_NAME_OPENED); this.container.style.display = "none"; - this.fire("hide"); + this.fire("cancel"); } }); })(wysihtml5);