diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-11 11:51:20 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-11 13:44:12 +0200 |
commit | 7a345f68dc424add673aee8bce5329e3543f66fb (patch) | |
tree | 015b1b8da9c668a342bdf5c6249bf0226ebaf28a /apps/files/src | |
parent | 2b5dd11d977c6eb5f68459cec4f66dad129cc4a6 (diff) | |
download | nextcloud-server-7a345f68dc424add673aee8bce5329e3543f66fb.tar.gz nextcloud-server-7a345f68dc424add673aee8bce5329e3543f66fb.zip |
fix(files): Make `openMenu` watcher null safe
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/components/FileEntryMixin.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index 83d0e460942..51e5acedf71 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -231,9 +231,11 @@ export default defineComponent({ 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') + const root = document.getElementById('app-content-vue') + if (root !== null) { + root.style.removeProperty('--mouse-pos-x') + root.style.removeProperty('--mouse-pos-y') + } }, 300) } }, |