diff --git a/www/common/common-interface.js b/www/common/common-interface.js index fee97a837..f519c34da 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -191,6 +191,8 @@ define([ var listener; var close = Util.once(function (result, ev) { + ev.stopPropagation(); + ev.preventDefault(); var $frame = $(tagger).fadeOut(150, function () { stopListening(listener); $frame.remove(); @@ -198,17 +200,21 @@ define([ }); }); - var $ok = findOKButton(tagger).click(function () { + var $ok = findOKButton(tagger).click(function (e) { var tokens = field.getTokens(); - close(tokens); + close(tokens, e); }); - var $cancel = findCancelButton(tagger).click(function () { - close(null); + var $cancel = findCancelButton(tagger).click(function (e) { + close(null, e); }); listenForKeys(function () { $ok.click(); }, function () { $cancel.click(); + }, tagger); + + $(tagger).on('click submit', function (e) { + e.stopPropagation(); }); document.body.appendChild(tagger);