diff options
Diffstat (limited to 'apps/files/src/components/FileEntryMixin.ts')
-rw-r--r-- | apps/files/src/components/FileEntryMixin.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index 58f5c1e9474..83d0e460942 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -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() { |