Skip to content

[6.x] Fix Control Panel not scrolling to top on navigation - #14965

Merged
jasonvarga merged 1 commit into
6.xfrom
scroll-to-top-on-navigation
Jul 10, 2026
Merged

[6.x] Fix Control Panel not scrolling to top on navigation#14965
jasonvarga merged 1 commit into
6.xfrom
scroll-to-top-on-navigation

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Jul 9, 2026

Copy link
Copy Markdown
Member

This pull request fixes an issue where the Control Panel wouldn't scroll back to the top when navigating between pages — after scrolling down a tall page, the next page would open scrolled down (clamped to its max scroll height) instead of at the top.

This was happening because the CP's real scroll container is #main-content — the window itself never scrolls. Inertia's scroll reset only acts on the window and elements marked with the scroll-region attribute, so it had nothing to reset and the previous scroll position persisted across navigations.

This PR fixes it by marking #main-content as a scroll-region, so Inertia now resets its scroll position on navigation and also restores it natively when navigating back/forward through browser history.

Fixes #14954

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit bc46d78 into 6.x Jul 10, 2026
25 checks passed
@jasonvarga
jasonvarga deleted the scroll-to-top-on-navigation branch July 10, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control Panel doesn't scroll to top on navigation

2 participants