diff --git a/components/Editor.js b/components/Editor.js index 7c20fb9..8f785c0 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -97,6 +97,10 @@ class Editor extends React.Component { window.navigator && window.navigator.userAgent.indexOf('Safari') !== -1 && window.navigator.userAgent.indexOf('Chrome') === -1 + this.isFirefox = + window.navigator && + window.navigator.userAgent.indexOf('Firefox') !== -1 && + window.navigator.userAgent.indexOf('Chrome') === -1 } carbonNode = React.createRef() @@ -225,6 +229,9 @@ class Editor extends React.Component { if (format !== 'open') { link.download = `${prefix}.${format}` } + if (this.isFirefox) { + link.target = '_blank' + } link.href = url document.body.appendChild(link) link.click()