Skip to content

A self-hosted media server and file management system

fix: context menu actions stopped working

aminnausinc097510de364
diff --git a/resources/js/components/cedar-ui/context-menu/ContextMenuItem.vue b/resources/js/components/cedar-ui/context-menu/ContextMenuItem.vue
index 534c01bd..a2761eac 100644
--- a/resources/js/components/cedar-ui/context-menu/ContextMenuItem.vue
+++ b/resources/js/components/cedar-ui/context-menu/ContextMenuItem.vue
@@ -35,7 +35,17 @@ useMutationObserver(subMenu, () => (isFloating.value = subMenu.value?.dataset.fl
v-bind="wrapperProps"
:class="cn({ [selectedStyle]: selected }, 'hocus:bg-overlay-accent h-7 w-full justify-start rounded-sm px-2 py-1.5 select-none focus:outline-none', style)"
:disabled="disabled"
- @click.stop="hasChildren ? (isSubMenuOpen = !isSubMenuOpen) : action?.()"
+ @click="
+ (e: MouseEvent) => {
+ if (hasChildren) {
+ e.stopPropagation();
+ isSubMenuOpen = !isSubMenuOpen;
+ return;
+ }
+
+ action?.();
+ }
+ "
>
<slot name="icon">
<component v-if="icon" :is="icon" class="size-4 shrink-0" />