Skip to content

Commit 56e952c

Browse files
flambohclaude
andcommitted
fix(mobile): switching pull request tabs no longer jumps the page
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent d0b81ce commit 56e952c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
393393
requestedSection.current = next;
394394
scrollOffsets.current[next] = offset;
395395
currentScrollOffset.current = { tab: next, offset };
396-
scrollViews.current[next]?.scrollToOffset({ offset, animated: false });
396+
// LegendList clamps to its measured rows, which leave out the short-tab minHeight below.
397+
scrollViews.current[next]?.getNativeScrollRef().scrollTo({ y: offset, animated: false });
397398
setSection(next);
398399
};
399400
const tabContent = activityContent;
@@ -676,6 +677,8 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
676677
// move the list in the same frame as the bar.
677678
contentInsetAdjustmentBehavior="automatic"
678679
contentInsetStartAdjustment={Platform.OS === "ios" ? insets.top : 0}
680+
// RN scrollTo clamps against raw insets and ignores the automatic bar inset.
681+
scrollToOverflowEnabled
679682
refreshControl={
680683
<RefreshControl
681684
refreshing={section === tab && pullRefresh.refreshing}

0 commit comments

Comments
 (0)