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

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2022-02-07 19:16:50 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2022-02-07 19:22:33 +0300
commit2463190ded52085a0f317dc5b057253aadaa5be4 (patch)
treed07b5952c52bc1f85e6f07aae87578c1dc20745b /src/components/MessagesList/MessagesGroup/Message
parent819cebbb98970fac84ad66ed93dc070941dde1ef (diff)
Reparent file picker and viewer in fullscreen mode
By default the file picker and the viewer are siblings of the fullscreen element, so they are not visible when in fullscreen mode. It is not possible to specify the parent nor to know when the file picker or the viewer were actually opened, so for the time being they are reparented if needed shortly after calling them. This is just a temporary hack until it is possible to specify the parent element, but that would require changes in the Vue library, the viewer and the server dialogs, so this horrible code will have to do for now. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'src/components/MessagesList/MessagesGroup/Message')
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue
index fce3ea866..64ce863e8 100644
--- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue
+++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue
@@ -446,6 +446,19 @@ export default {
},
],
})
+
+ // FIXME Remove this hack once it is possible to set the parent
+ // element of the viewer.
+ // By default the viewer is a sibling of the fullscreen element, so
+ // it is not visible when in fullscreen mode. It is not possible to
+ // specify the parent nor to know when the viewer was actually
+ // opened, so for the time being it is reparented if needed shortly
+ // after calling it.
+ setTimeout(() => {
+ if (this.$store.getters.isFullscreen()) {
+ document.getElementById('content-vue').appendChild(document.getElementById('viewer'))
+ }
+ }, 1000)
},
},
}