From faf813c354b24b2a665ca52adb3072f3e8b64be8 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 1 Aug 2026 18:01:48 +0000 Subject: [PATCH] B105: keep scroll baseline while focused; force dock under uiFocused Advance lastScrollTop even when search is focused so the first scroll after blur does not false-flip snap. Re-assert dock whenever uiFocused and the sheet left dock (handle collapse cannot hide an active search). Co-authored-by: Francisco Solla --- .../campaign/shell/CampaignQuickActionsDrawer.tsx | 6 +++--- src/components/campaign/shell/CampaignQuickActionsHost.tsx | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/campaign/shell/CampaignQuickActionsDrawer.tsx b/src/components/campaign/shell/CampaignQuickActionsDrawer.tsx index a08763a2..52846002 100644 --- a/src/components/campaign/shell/CampaignQuickActionsDrawer.tsx +++ b/src/components/campaign/shell/CampaignQuickActionsDrawer.tsx @@ -54,12 +54,12 @@ export const CampaignQuickActionsDrawer = ({ [setSnapPoint], ) - // Focus / active query on the peek search expands to dock (B105). + // Active search focus keeps the drawer docked (B105) — same gate as scroll. useEffect(() => { - if (uiFocused) { + if (uiFocused && !isDock) { setSnapPoint(QUICK_ACTIONS_SNAP_DOCK) } - }, [setSnapPoint, uiFocused]) + }, [isDock, setSnapPoint, uiFocused]) return ( const peekHeight = isDock ? QUICK_ACTIONS_SNAP_DOCK : QUICK_ACTIONS_SNAP_COLLAPSED const syncSnapFromScroll = useCallback(() => { - if (uiFocused) return - const scrollport = scrollRef.current if (!scrollport) return @@ -35,6 +33,9 @@ const CampaignContentScrollWithPeek = ({ children }: { children: ReactNode }) => const direction = quickActionsScrollDirection(lastScrollTopRef.current, nextTop) lastScrollTopRef.current = nextTop + // Keep the scroll baseline fresh while search is focused; only gate snap writes. + if (uiFocused) return + if (direction === 'down') { setSnapPoint(QUICK_ACTIONS_SNAP_COLLAPSED) return