mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-04 08:15:41 +00:00
fix: open the reader's more menu in place instead of sliding in from the right
This commit is contained in:
@@ -465,13 +465,18 @@ export const ContextMenu = forwardRef<HTMLDivElement, ContextMenuProps>(
|
||||
<MenuLevelContext.Provider value={level}>
|
||||
<div
|
||||
ref={setRefs}
|
||||
// w-max: before the first clamp the menu sits where it opened,
|
||||
// often near the window's right edge, and would shrink to the room
|
||||
// left there. Clamped by that narrower width, it then grows and
|
||||
// jumps left (the ⋮ menu slid in).
|
||||
className={cn(
|
||||
"fixed z-50 min-w-[200px] outline-none",
|
||||
"fixed z-50 w-max min-w-[200px] outline-none",
|
||||
CONTEXT_MENU_PANEL_CLASS
|
||||
)}
|
||||
style={{
|
||||
left: renderPosition.x,
|
||||
top: renderPosition.y,
|
||||
maxWidth: `calc(100vw - ${2 * VIEWPORT_MARGIN}px)`,
|
||||
visibility: isPositioned ? "visible" : "hidden",
|
||||
}}
|
||||
role="menu"
|
||||
|
||||
Reference in New Issue
Block a user