Don't close the share modal when clicking Preview

This commit is contained in:
yflory
2019-11-22 16:40:20 +01:00
parent 1703186ebf
commit 82bb710060
2 changed files with 3 additions and 1 deletions

View File

@@ -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 () {