From a774e9ba5ba9ea51b2bb898a6fe63e32e6b7f696 Mon Sep 17 00:00:00 2001 From: Christina Toegl <toegl@tugraz.at> Date: Tue, 17 Nov 2020 14:59:40 +0100 Subject: [PATCH] Add scroll to top when switching activities (#37) --- packages/app-shell/src/app-shell.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/app-shell/src/app-shell.js b/packages/app-shell/src/app-shell.js index b156279b..933c4bd5 100644 --- a/packages/app-shell/src/app-shell.js +++ b/packages/app-shell/src/app-shell.js @@ -350,6 +350,7 @@ export class AppShell extends ScopedElementsMixin(LitElement) { } let updateFunc = () => { + window.scrollTo({ top: 0, left: 0, behavior: "auto" }); this.updatePageTitle(); this.subtitle = this.activeMetaDataText("short_name"); this.description = this.activeMetaDataText("description"); -- GitLab