diff --git a/src/mixins/openLocal.js b/src/mixins/openLocal.js index 87c1670cc2..19df2baaca 100644 --- a/src/mixins/openLocal.js +++ b/src/mixins/openLocal.js @@ -95,8 +95,6 @@ export default { openLocally() { if (this.openingLocally) { - this.openingLocally = false - axios.post( generateOcsUrl('apps/files/api/v1/openlocaleditor'), { path: this.filename }, @@ -106,8 +104,13 @@ export default { + encodePath(this.filename) + '?token=' + result.data.ocs.data.token - this.showOpenLocalFinished(url, window.top) - this.close() + this.showOpenLocalFinished() + // Firefox may cancel requests that the files app could send when updating the file meta data + // so we need to wait a bit before closing the viewer + setTimeout(() => { + this.openingLocally = false + this.close() + }, 1000) window.open(url, '_self') }) } diff --git a/src/view/Office.vue b/src/view/Office.vue index 386e5d3e34..dc360cb04a 100644 --- a/src/view/Office.vue +++ b/src/view/Office.vue @@ -469,7 +469,7 @@ export default { this.buttonClicked(args) break case 'Doc_ModifiedStatus': - if (args.Modified !== this.modified) { + if (args.Modified !== this.modified && !this.openingLocally) { FilesAppIntegration.updateFileInfo(undefined, Date.now()) } this.modified = args.Modified