UX: Do not scroll-top for aborted transitions (#22744)

We only want to scroll to the top for successful transitions. If a transition is aborted (e.g. when clicking a chat link when chat is in drawer mode) then we should maintain the existing scroll location.
This commit is contained in:
David Taylor 2023-08-01 18:44:25 +01:00 committed by GitHub
parent 2c4faf48f9
commit 945bb9161f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@ export default class RouteScrollManager extends Service {
@bind
routeDidChange(transition) {
if (transition.isAborted) {
return;
}
const newUuid = this.router.location.getState?.().uuid;
if (newUuid === this.uuid) {