mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Fix download button to work on firefox
Summary: need to setTimeout on the removal from the DOM so these browsers don't freak out Test Plan: downloaded images on firefox and safari Reviewers: vrana, epriestley Reviewed By: vrana CC: aran, Korvin Maniphest Tasks: T1896 Differential Revision: https://secure.phabricator.com/D3799
This commit is contained in:
parent
e0cc277d5f
commit
49a7f9e7d7
1 changed files with 6 additions and 1 deletions
|
@ -154,7 +154,12 @@ JX.behavior('lightbox-attachments', function (config) {
|
||||||
'click',
|
'click',
|
||||||
null,
|
null,
|
||||||
function (e) {
|
function (e) {
|
||||||
e.prevent(); closeLightBox(e); form.submit();
|
e.prevent();
|
||||||
|
form.submit();
|
||||||
|
// Firefox and probably IE need this trick to work.
|
||||||
|
// Removing a form from the DOM while its submitting is
|
||||||
|
// tricky business.
|
||||||
|
setTimeout(JX.bind(null, closeLightBox, e), 0);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
var downloadSpan = JX.$N('span',
|
var downloadSpan = JX.$N('span',
|
||||||
|
|
Loading…
Reference in a new issue