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