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:36:34 +0300 |
commit | b2853e907cddcf3ff3068239984a9657ccf39cfc (patch) | |
tree | 8db78c20987f0ebae19ebbdcea52fb475bc33aeb /src | |
parent | 633a9d7cd0b5a6953533bd6632dec6a3a88f5eca (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')
-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) }) |