Skip to content

Commit

Permalink
Fix download click for Firefox < 75 (attach to DOM)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrenner committed Jun 29, 2022
1 parent 74a6bcd commit 4a31ebe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/control/Export.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ BR.Export = L.Class.extend({
if (name) {
link.download = name;
}
link.hidden = true;
// in Firefox < 75 click() only works when element is attached to DOM tree
document.body.appendChild(link);
link.click();
link.remove();
},

_exportServer: function (e) {
Expand Down

0 comments on commit 4a31ebe

Please sign in to comment.