From 64023eecd0051c57391e28a989aec4660d891a3b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Mon, 5 Aug 2013 16:47:28 +0200 Subject: [PATCH 1/1] Prevent widget's click events to propagate --- modules/documentCanvas/canvas/widgets.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/documentCanvas/canvas/widgets.js b/modules/documentCanvas/canvas/widgets.js index cedf16d..570bd0b 100644 --- a/modules/documentCanvas/canvas/widgets.js +++ b/modules/documentCanvas/canvas/widgets.js @@ -17,7 +17,8 @@ return { .css('display', 'inline') .show(); - mydom.click(function() { + mydom.click(function(e) { + e.stopPropagation(); clickHandler(); }); @@ -27,7 +28,10 @@ return { hideButton: function(clickHandler) { var mydom = $('x') .addClass('canvas-widget canvas-widget-hide-button'); - mydom.click(clickHandler); + mydom.click(function(e) { + e.stopPropagation(); + clickHandler(); + }); return mydom; } -- 2.20.1