X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=public%2Fjs%2Futils.js;h=aba7b1d1f7aa6ebd91187612b4afba17af77bbd2;hp=4c53c76d07cadf7a183b797e52cf8b68f9e5384e;hb=40368091bccafc07d6a580c934b72e963a635b16;hpb=087eabcce8fb3e745e056e40a1b12869eab34f62 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); }