diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue index f456c681392..dbfa16c0a1b 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue @@ -449,6 +449,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) }, }, } diff --git a/src/components/NewMessageForm/NewMessageForm.vue b/src/components/NewMessageForm/NewMessageForm.vue index 52c58f8c473..3a2e579ff68 100644 --- a/src/components/NewMessageForm/NewMessageForm.vue +++ b/src/components/NewMessageForm/NewMessageForm.vue @@ -426,6 +426,19 @@ export default { shareFile(path, this.token) this.$refs.advancedInput.focusInput() }) + + // FIXME Remove this hack once it is possible to set the parent + // element of the file picker. + // By default the file picker 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 file picker + // 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.querySelector('.oc-dialog')) + } + }, 1000) }, /**