|
|
@ -97,6 +97,10 @@ class Editor extends React.Component {
|
|
|
|
window.navigator &&
|
|
|
|
window.navigator &&
|
|
|
|
window.navigator.userAgent.indexOf('Safari') !== -1 &&
|
|
|
|
window.navigator.userAgent.indexOf('Safari') !== -1 &&
|
|
|
|
window.navigator.userAgent.indexOf('Chrome') === -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()
|
|
|
|
carbonNode = React.createRef()
|
|
|
@ -225,6 +229,9 @@ class Editor extends React.Component {
|
|
|
|
if (format !== 'open') {
|
|
|
|
if (format !== 'open') {
|
|
|
|
link.download = `${prefix}.${format}`
|
|
|
|
link.download = `${prefix}.${format}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.isFirefox) {
|
|
|
|
|
|
|
|
link.target = '_blank'
|
|
|
|
|
|
|
|
}
|
|
|
|
link.href = url
|
|
|
|
link.href = url
|
|
|
|
document.body.appendChild(link)
|
|
|
|
document.body.appendChild(link)
|
|
|
|
link.click()
|
|
|
|
link.click()
|
|
|
|