From 40368091bccafc07d6a580c934b72e963a635b16 Mon Sep 17 00:00:00 2001 From: arno Date: Fri, 3 Sep 2010 16:27:09 +0200 Subject: [PATCH] fixes: do not activate close button on submit events --- public/js/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/js/utils.js b/public/js/utils.js index 4c53c76..aba7b1d 100644 --- a/public/js/utils.js +++ b/public/js/utils.js @@ -26,6 +26,9 @@ var CloseBtn = Class.create({ elt.insert({top: btn}); btn.observe("click", function(evt) { evt.stop(); + if (evt.detail === 0) { // it's not a real click, possibly a submit event + return; + } if (typeof options.callback === "function") { options.callback.call(elt); } -- 2.39.2