From 39e3f8fb8115f245eb510112254d04f09536f902 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Wed, 25 Feb 2026 14:13:52 -0500 Subject: [PATCH] fix(sidebar): lock user menu position when sidebar is resized (#21853) Use align="start" (left-anchor) instead of align="end" (right-anchor) on the user menu DropdownMenu.Content, combined with avoidCollisions={false} to prevent Floating UI from auto-flipping back to end-alignment when the menu's left edge is near the viewport boundary. Previously, the right edge of the full-width trigger row tracked the right edge of the sidebar, so resizing the sidebar wider caused the menu to drift rightward. With start alignment the menu is anchored to the left edge of the trigger, which is stable regardless of sidebar width. --- src/lib/components/layout/Sidebar/UserMenu.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/components/layout/Sidebar/UserMenu.svelte b/src/lib/components/layout/Sidebar/UserMenu.svelte index c5eca5a60..0203c23ce 100644 --- a/src/lib/components/layout/Sidebar/UserMenu.svelte +++ b/src/lib/components/layout/Sidebar/UserMenu.svelte @@ -88,7 +88,8 @@ class="w-full {className} rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg text-sm" sideOffset={4} side="top" - align="end" + align="start" + avoidCollisions={false} transition={(e) => fade(e, { duration: 100 })} > {#if profile}