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:
authormax-nextcloud <max@nextcloud.com>2022-01-18 10:37:10 +0300
committerGitHub <noreply@github.com>2022-01-18 10:37:10 +0300
commit8dea6f6228fae79c0c850dbc74f67d841cc8afcd (patch)
treec8c2bf4f0b2e45896284a7cb104c1a71f41f5f4a /src
parent24a7d5a6cebfb178a545d2f4d0b28f3473a93ad6 (diff)
parentb2853e907cddcf3ff3068239984a9657ccf39cfc (diff)
Merge pull request #2105 from nextcloud/backport/2104/stable23
[stable23] Fix closing the editor modal in public folder view
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)
})