diff --git a/web/src/lib/components/shared-components/context-menu/context-menu.svelte b/web/src/lib/components/shared-components/context-menu/context-menu.svelte index 7bf9ba58b3..dbe32f2701 100644 --- a/web/src/lib/components/shared-components/context-menu/context-menu.svelte +++ b/web/src/lib/components/shared-components/context-menu/context-menu.svelte @@ -47,30 +47,23 @@ const left = Math.max(8, Math.min(window.innerWidth - rect.width, x - directionWidth)); const top = Math.max(8, Math.min(window.innerHeight - menuHeight, y)); + const maxHeight = window.innerHeight - top - 8; - return { left, top }; + return { left, top, maxHeight }; }); // We need to bind clientHeight since the bounding box may return a height // of zero when starting the 'slide' animation. let height: number = $state(0); - - let isTransitioned = $state(false);