Skip to content

Commit

Permalink
Merge pull request #47876 from nextcloud/backport/47848/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(files): Reset context menu position on close
  • Loading branch information
skjnldsv authored Sep 15, 2024
2 parents 1e0ecc4 + 263a381 commit 8500f0d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
19 changes: 19 additions & 0 deletions apps/files/src/components/FileEntryMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,25 @@ 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 = document.getElementById('app-content-vue')
if (root !== null) {
root.style.removeProperty('--mouse-pos-x')
root.style.removeProperty('--mouse-pos-y')
}
}, 300)
}
},
},

beforeDestroy() {
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit 8500f0d

Please sign in to comment.