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:53:15 +0200
commiteb897b112e8d85ecce85cb0110af690b53be15a5 (patch)
tree18a929bfc3239ef3842c4abdeaea43c2ca0dfecd
parent2a5d6bb713d51be5938d8e220fb33f65eeb7e529 (diff)
downloadnextcloud-server-eb897b112e8d85ecce85cb0110af690b53be15a5.tar.gz
nextcloud-server-eb897b112e8d85ecce85cb0110af690b53be15a5.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 94a83d562b0..51e597c8fc5 100644
--- a/apps/files/src/components/FileEntryMixin.ts
+++ b/apps/files/src/components/FileEntryMixin.ts
@@ -222,9 +222,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)
}
},