fix(theseus): Fixed scroll behavior bug (#1249)
This commit is contained in:
parent
abec2e48d4
commit
df76d9a50a
@ -892,7 +892,6 @@ onUnmounted(() => unlistenOffline())
|
||||
|
||||
.search-container {
|
||||
display: flex;
|
||||
height: 100%; /* takes up only the necessary height */
|
||||
overflow-y: auto;
|
||||
scroll-behavior: smooth;
|
||||
|
||||
|
||||
@ -138,7 +138,11 @@ export default new createRouter({
|
||||
linkActiveClass: 'router-link-active',
|
||||
linkExactActiveClass: 'router-link-exact-active',
|
||||
scrollBehavior() {
|
||||
// always scroll to top
|
||||
return { top: 0 }
|
||||
// Sometimes Vue's scroll behavior is not working as expected, so we need to manually scroll to top (especially on Linux)
|
||||
document.querySelector(".router-view").scrollTop = 0;
|
||||
return {
|
||||
el: ".router-view",
|
||||
top: 0
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user