Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scroll when loading.js/ts is used #48986

Merged
merged 1 commit into from
Apr 29, 2023

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Apr 29, 2023

What?

Whenever you navigated and a page suspended through loading or an error happened caught by error in the first level of segments (e.g. /dashboard but not /dashboard/settings) scroll would not be applied. This happened because the focus and scroll handling component is rendered as part of InnerLayoutRouter and the Suspense / Error boundary was rendered around InnerLayoutRouter. This behavior is incorrect as we still want to immediately scroll to the place where the loading is rendered.

This PR fixes the behavior by allowing the scroll to apply to loading / error too.

How?

Moved the scrolling component around the loading/error/innerlayout boundary and added tests.

@timneutkens
Copy link
Member Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@kodiakhq kodiakhq bot merged commit 905b62e into canary Apr 29, 2023
@kodiakhq kodiakhq bot deleted the 04-29-Fix_scroll_when_loading.js/ts_is_used branch April 29, 2023 17:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants