Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2022-01-17 20:04:42 +0300
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-01-17 22:36:34 +0300
commitb2853e907cddcf3ff3068239984a9657ccf39cfc (patch)
tree8db78c20987f0ebae19ebbdcea52fb475bc33aeb /src
parent633a9d7cd0b5a6953533bd6632dec6a3a88f5eca (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.js26
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)
})