aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-09-11 11:51:20 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-09-11 11:51:51 +0200
commitbfa9b5d0f67760aaff4524a16ee17101ee56b6a3 (patch)
tree8ca5595f984839efb142a07a9ef9b93fca7381bb
parent0978631554e6d0c507de74861baca868d5cb5e5d (diff)
downloadnextcloud-server-bfa9b5d0f67760aaff4524a16ee17101ee56b6a3.tar.gz
nextcloud-server-bfa9b5d0f67760aaff4524a16ee17101ee56b6a3.zip
fix(files): Make `openMenu` watcher null safe
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--apps/files/src/components/FileEntryMixin.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts
index 7a4f4e809f7..4c88cba00b8 100644
--- a/apps/files/src/components/FileEntryMixin.ts
+++ b/apps/files/src/components/FileEntryMixin.ts
@@ -221,9 +221,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)
}
},