From 3d9ea802d063054b9fe8e4b99901f3aa85eaed1b Mon Sep 17 00:00:00 2001 From: atomiks Date: Thu, 26 Dec 2024 14:51:28 +1100 Subject: [PATCH] Disable hover while openReason is click --- packages/react/src/menu/root/useMenuRoot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/menu/root/useMenuRoot.ts b/packages/react/src/menu/root/useMenuRoot.ts index 3f8977a6fa..82cd18d9a1 100644 --- a/packages/react/src/menu/root/useMenuRoot.ts +++ b/packages/react/src/menu/root/useMenuRoot.ts @@ -143,7 +143,7 @@ export function useMenuRoot(parameters: useMenuRoot.Parameters): useMenuRoot.Ret }); const hover = useHover(floatingRootContext, { - enabled: hoverEnabled && openOnHover && !disabled, + enabled: hoverEnabled && openOnHover && !disabled && openReason !== 'click', handleClose: safePolygon({ blockPointerEvents: true }), mouseOnly: true, move: false,