Fix an issue preventing the share modal to be used more than once
This commit is contained in:
parent
f6926699bc
commit
0b1795e5a1
@ -317,11 +317,11 @@ define([
|
|||||||
message = dialog.message(msg);
|
message = dialog.message(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
var close = Util.once(function (el) {
|
var close = function (el) {
|
||||||
var $el = $(el).fadeOut(150, function () {
|
var $el = $(el).fadeOut(150, function () {
|
||||||
$el.remove();
|
$el.detach();
|
||||||
});
|
});
|
||||||
});
|
};
|
||||||
|
|
||||||
var navs = [];
|
var navs = [];
|
||||||
opt.buttons.forEach(function (b) {
|
opt.buttons.forEach(function (b) {
|
||||||
@ -329,7 +329,7 @@ define([
|
|||||||
var button = h('button', { tabindex: '1', 'class': b.className || '' }, b.name);
|
var button = h('button', { tabindex: '1', 'class': b.className || '' }, b.name);
|
||||||
$(button).click(function () {
|
$(button).click(function () {
|
||||||
b.onClick();
|
b.onClick();
|
||||||
close($(this).parents('.alertify').first());
|
close($(button).parents('.alertify').first());
|
||||||
});
|
});
|
||||||
if (b.keys && b.keys.length) { $(button).attr('data-keys', JSON.stringify(b.keys)); }
|
if (b.keys && b.keys.length) { $(button).attr('data-keys', JSON.stringify(b.keys)); }
|
||||||
navs.push(button);
|
navs.push(button);
|
||||||
@ -352,6 +352,7 @@ define([
|
|||||||
if (!$(el).is(':visible')) { return; }
|
if (!$(el).is(':visible')) { return; }
|
||||||
$(el).click();
|
$(el).click();
|
||||||
}, frame);
|
}, frame);
|
||||||
|
$(el).removeAttr('data-keys');
|
||||||
});
|
});
|
||||||
document.body.appendChild(frame);
|
document.body.appendChild(frame);
|
||||||
$(frame).focus();
|
$(frame).focus();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user