mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Fix download saver on Firefox
Turns out that Firefox needs the link to be in the document before it will honour the click on it.
This commit is contained in:
parent
4ad6f05010
commit
1e5842dc1c
@ -24,7 +24,9 @@ DownloadSaver.prototype.save = function(text) {
|
||||
link.setAttribute("target","_blank");
|
||||
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
|
||||
link.setAttribute("download","tiddlywiki.html");
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
return true;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user