mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 23:53:05 +00:00
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 <fsolla@users.noreply.github.com>
This commit is contained in:
parent
98a69ab153
commit
faf813c354
2 changed files with 6 additions and 5 deletions
|
|
@ -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 (
|
||||
<Drawer
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ const CampaignContentScrollWithPeek = ({ children }: { children: ReactNode }) =>
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue