mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #47848 from nextcloud/fix/files-context-menu
fix(files): Reset context menu position on close
This commit is contained in:
commit
9dbf88816c
3 changed files with 20 additions and 3 deletions
|
|
@ -220,6 +220,23 @@ export default defineComponent({
|
|||
this.resetState()
|
||||
}
|
||||
},
|
||||
|
||||
openedMenu() {
|
||||
if (this.openedMenu === false) {
|
||||
// TODO: This timeout can be removed once `close` event only triggers after the transition
|
||||
// ref: https://github.com/nextcloud-libraries/nextcloud-vue/pull/6065
|
||||
window.setTimeout(() => {
|
||||
if (this.openedMenu) {
|
||||
// was reopened while the animation run
|
||||
return
|
||||
}
|
||||
// Reset any right menu position potentially set
|
||||
const root = this.$el?.closest('main.app-content') as HTMLElement
|
||||
root.style.removeProperty('--mouse-pos-x')
|
||||
root.style.removeProperty('--mouse-pos-y')
|
||||
}, 300)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
|
|
|||
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue