Skip to content
Snippets Groups Projects

Add scroll to top when switching activities (#37)

1 unresolved thread
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
@@ -350,10 +350,13 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
}
let updateFunc = () => {
window.scrollTo({ top: 0, left: 0, behavior: "auto" });
if (window.pageYOffset !== 0) {
window.scrollTo(0, 96);
}
this.updatePageTitle();
this.subtitle = this.activeMetaDataText("short_name");
this.description = this.activeMetaDataText("description");
};
// If it is empty assume the element is already registered through other means
@@ -641,6 +644,8 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
ul.menu.hidden {
display: none;
}
}
`;
}
Loading