Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion web-client/src/views/LandingView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'
import { ref, computed, watch, onMounted, onBeforeUnmount } from 'vue'
import DOMPurify from 'dompurify'
import { marked } from 'marked'
import SelectButton from 'primevue/selectbutton'
Expand Down Expand Up @@ -214,6 +214,16 @@ onMounted(() => {
}
})

// .sliderule-content is a persistent container owned by App.vue and shared
// across every route. Restore it to the top before the next view mounts,
// since we're the only view that scrolls it away from 0 (see Issue #1087).
onBeforeUnmount(() => {
document.querySelector('.sliderule-content')?.scrollTo({
top: 0,
behavior: 'instant' as ScrollBehavior
})
})

watch(selectedTab, (tab) => {
selectedRelease.value = null
releaseHtml.value = ''
Expand Down
Loading