Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reparent file picker and viewer in fullscreen mode #6879

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
},
}
Expand Down
13 changes: 13 additions & 0 deletions src/components/NewMessageForm/NewMessageForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,19 @@ export default {
shareFile(path, this.token)
this.$refs.advancedInput.focusInput()
})

// FIXME Remove this hack once it is possible to set the parent
danxuliu marked this conversation as resolved.
Show resolved Hide resolved
// 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)
},

/**
Expand Down