diff --git a/app/models/Document.js b/app/models/Document.js index 9b240c0b..0336d2f7 100644 --- a/app/models/Document.js +++ b/app/models/Document.js @@ -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();