diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 245cbe617..d4cc070da 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -348,7 +348,8 @@ define([ if (!b.name || !b.onClick) { return; } var button = h('button', { tabindex: '1', 'class': b.className || '' }, b.name); $(button).click(function () { - b.onClick(); + var noClose = b.onClick(); + if (noClose) { return; } var $modal = $(button).parents('.alertify').first(); if ($modal.length && $modal[0].closeModal) { $modal[0].closeModal(function () { diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index cc04c97ee..63921a8a6 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1103,6 +1103,7 @@ define([ embed: Util.isChecked($link.find('#cp-share-embed')) }); window.open(v); + return true; }, keys: [[13, 'ctrl']] },