Skip to content
TypeScript

fix(web): keep portaled menus clickable over Electron drag regions (#12527)

maria3cfebf4aa3ce
diff --git a/apps/web/src/components/ui/menu.tsx b/apps/web/src/components/ui/menu.tsx
index 3563b0ed01a..8beed75880a 100644
--- a/apps/web/src/components/ui/menu.tsx
+++ b/apps/web/src/components/ui/menu.tsx
@@ -56,6 +56,10 @@ function MenuPopup({
<MenuPrimitive.Popup
className={cn(
"dropdown-glass relative flex origin-(--transform-origin) rounded-lg shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] outline-none focus:outline-none dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]",
+ // Portaled menus can overlap an Electron window drag region (e.g.
+ // the Review panel header). Drag hit-testing ignores z-index, so
+ // the topmost row would stay unhoverable without this opt-out.
+ "[-webkit-app-region:no-drag]",
!hasExplicitWidthClass && "min-w-32",
className,
)}