Skip to content

Commit 1118228

Browse files
scttcperandrewshie-sentry
authored andcommitted
fix(issues): Avoid scroll restoration blocking jump-to scroll (#91870)
1 parent 313b5d5 commit 1118228

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

static/app/views/issueDetails/streamline/eventTitle.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,12 @@ function EventNavigationLink({
212212
}
213213

214214
setIsCollapsed(false);
215-
document
216-
.getElementById(config.key)
217-
?.scrollIntoView({block: 'start', behavior: 'smooth'});
215+
// Animation frame avoids conflicting with react-router ScrollRestoration
216+
requestAnimationFrame(() => {
217+
document
218+
.getElementById(config.key)
219+
?.scrollIntoView({block: 'start', behavior: 'smooth'});
220+
});
218221
}}
219222
borderless
220223
size="xs"

0 commit comments

Comments
 (0)