diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2022-01-17 20:04:42 +0300 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2022-01-17 22:21:45 +0300 |
commit | 8fc014d5690fb0e716c95c3c75025730bb222817 (patch) | |
tree | f1f850808199f775a1dc8d306ba02f00141e1a67 /src/helpers/files.js | |
parent | c1fa5e6bf920bee94c9b6d0f6e7faae75b88d2bd (diff) |
Fix closing the editor modal in public folder view
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'src/helpers/files.js')
-rw-r--r-- | src/helpers/files.js | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/helpers/files.js b/src/helpers/files.js index a8d3f81f1..8d50a6a09 100644 --- a/src/helpers/files.js +++ b/src/helpers/files.js @@ -101,15 +101,23 @@ const registerFileActionFallback = () => { Vue.prototype.OCA = window.OCA const Editor = imports[1].default const vm = new Vue({ - render: h => h(Editor, { - props: { - fileId: file ? file.id : null, - active: true, - shareToken: sharingToken, - relativePath: path, - mimeType: file.mimetype, - }, - }), + render: function(h) { // eslint-disable-line + const self = this + return h(Editor, { + props: { + fileId: file ? file.id : null, + active: true, + shareToken: sharingToken, + relativePath: path, + mimeType: file.mimetype, + }, + on: { + close: function() { // eslint-disable-line + self.$destroy() + }, + }, + }) + }, }) vm.$mount(ViewerRoot) }) |