diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c1c4f8b8287f81fa748d5f748b48df17f4db8fd2..b9b2fd4186558cfce8881bca063643b0e213b6a2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -30,6 +30,7 @@ Fixed * App switched to offline state when the user was logged out/in. * The `Stop Impersonation` button is not shown due to an oversee when changing the type of the whoAmI query to an object of UserType * Offline fallback page for legacy pages was misleading sometimes. +* Route changes in the Legacy-Component iframe didn't trigger a scroll to the top `3.0b3`_ - 2023-03-19 --------------------- diff --git a/aleksis/core/frontend/components/LegacyBaseTemplate.vue b/aleksis/core/frontend/components/LegacyBaseTemplate.vue index 30ef189b7daa037bc47fe711515e112b8391b377..84f7e2e12be16f868c731b06f11ad0e4d2557ef4 100644 --- a/aleksis/core/frontend/components/LegacyBaseTemplate.vue +++ b/aleksis/core/frontend/components/LegacyBaseTemplate.vue @@ -103,6 +103,10 @@ export default { $route() { // Show loading animation once route changes this.$root.contentLoading = true; + + // Scroll to top only when route changes to not affect form submits etc. + // A small duration to avoid flashing of the UI + this.$vuetify.goTo(0, { duration: 10 }); }, }, name: "LegacyBaseTemplate",