From 896bf1fe08d30e0f1e966153eb26a77886755840 Mon Sep 17 00:00:00 2001 From: nbare Date: Wed, 8 May 2024 07:52:34 -0500 Subject: [PATCH 1/2] fix(V-Menu): only closing menu in closeParents if persistent is not set --- packages/vuetify/src/components/VMenu/VMenu.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vuetify/src/components/VMenu/VMenu.tsx b/packages/vuetify/src/components/VMenu/VMenu.tsx index 7ac262c0b47..fe93404ddba 100644 --- a/packages/vuetify/src/components/VMenu/VMenu.tsx +++ b/packages/vuetify/src/components/VMenu/VMenu.tsx @@ -77,7 +77,8 @@ export const VMenu = genericComponent()({ closeParents (e) { setTimeout(() => { if (!openChildren.value && - (e == null || (e && !isClickInsideElement(e, overlay.value!.contentEl!))) + (e == null || (e && !isClickInsideElement(e, overlay.value!.contentEl!))) && + !props.persistent ) { isActive.value = false parent?.closeParents() From 0389dbb42ff7342bf00be102a6782d7534354f95 Mon Sep 17 00:00:00 2001 From: nbare Date: Wed, 8 May 2024 09:13:28 -0500 Subject: [PATCH 2/2] fix(V-Menu): moving persistent check above click check --- packages/vuetify/src/components/VMenu/VMenu.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vuetify/src/components/VMenu/VMenu.tsx b/packages/vuetify/src/components/VMenu/VMenu.tsx index fe93404ddba..0c194d988d9 100644 --- a/packages/vuetify/src/components/VMenu/VMenu.tsx +++ b/packages/vuetify/src/components/VMenu/VMenu.tsx @@ -77,8 +77,8 @@ export const VMenu = genericComponent()({ closeParents (e) { setTimeout(() => { if (!openChildren.value && - (e == null || (e && !isClickInsideElement(e, overlay.value!.contentEl!))) && - !props.persistent + !props.persistent && + (e == null || (e && !isClickInsideElement(e, overlay.value!.contentEl!))) ) { isActive.value = false parent?.closeParents()