1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +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:
Bob Trahan 2012-10-23 11:52:59 -07:00
parent e0cc277d5f
commit 49a7f9e7d7

View file

@ -154,7 +154,12 @@ JX.behavior('lightbox-attachments', function (config) {
'click',
null,
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',