Closes #692 - Fixes download files in Firefox

This commit is contained in:
Tom Moor
2018-07-20 23:51:05 -07:00
parent 1bb4583b3f
commit e20232a869

View File

@ -275,6 +275,9 @@ class Document extends BaseModel {
const blob = new Blob([unescape(this.text)], { type: 'text/markdown' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
// Firefox support requires the anchor tag be in the DOM to trigger the dl
if (document.body) document.body.appendChild(a);
a.href = url;
a.download = `${this.title}.md`;
a.click();