diff --git a/frontend/src/components/SwipeTabs.tsx b/frontend/src/components/SwipeTabs.tsx index 39bce3e..d88f377 100644 --- a/frontend/src/components/SwipeTabs.tsx +++ b/frontend/src/components/SwipeTabs.tsx @@ -295,7 +295,9 @@ export function SwipeTabs({ let offset = dx; const atStart = state.startIndex <= 0; const atEnd = state.startIndex >= tabs.length - 1; - if ((atStart && dx > 0) || (atEnd && dx < 0)) { + // Don't apply resistance at start if onSwipePastStart is defined (sidebar can open) + const hasVirtualTabAtStart = !!onSwipePastStart; + if ((atStart && dx > 0 && !hasVirtualTabAtStart) || (atEnd && dx < 0)) { offset = dx * EDGE_RESISTANCE; } offset = Math.max(Math.min(offset, width), -width); @@ -306,7 +308,7 @@ export function SwipeTabs({ preventDefault(); } }, - [scheduleDragUpdate, tabs.length] + [onSwipePastStart, scheduleDragUpdate, tabs.length] ); const finishDrag = useCallback(