Skip to content

Commit 1f005d3

Browse files
fix(replays): don't show jump down buttons if no scrolling is needed (#60055)
this was happening due to an off-by-one error. if we reach the end of the replay and scroll to the bottom of the tab (e.g. the last error/network/etc frame is visible), `rowIndex` is always 1 more than the `visibleRange.stopIndex`. this was causing the button to render again in this instance, which we don't want. before: https://github.com/getsentry/sentry/assets/56095982/1c619d60-c137-4340-a06c-261a3348a83b after: https://github.com/getsentry/sentry/assets/56095982/930917e7-5932-4727-b975-10a9cad955a5 fixes #58902
1 parent e3f4723 commit 1f005d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

static/app/components/replays/useJumpButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function useJumpButtons({
5757
handleClick,
5858
onRowsRendered,
5959
onSectionRendered,
60-
showJumpDownButton: rowIndex > visibleRange.stopIndex,
60+
showJumpDownButton: rowIndex > visibleRange.stopIndex + 1,
6161
showJumpUpButton: rowIndex < visibleRange.startIndex,
6262
};
6363
}

0 commit comments

Comments
 (0)