the first 50px are excluded from the scrolling hide mechanism

This commit is contained in:
ogerly 2023-02-09 13:19:37 +01:00
parent 4ae4edf000
commit e6f2d14fee
2 changed files with 13 additions and 9 deletions

View File

@ -300,10 +300,12 @@ export default {
methods: { methods: {
handleScroll() { handleScroll() {
const currentScrollPos = window.pageYOffset const currentScrollPos = window.pageYOffset
if (this.prevScrollpos > currentScrollPos) { if (this.prevScrollpos > 50) {
this.hideNavbar = false if (this.prevScrollpos > currentScrollPos) {
} else { this.hideNavbar = false
this.hideNavbar = true } else {
this.hideNavbar = true
}
} }
this.prevScrollpos = currentScrollPos this.prevScrollpos = currentScrollPos
}, },

View File

@ -213,11 +213,13 @@ export default {
}, },
handleScroll() { handleScroll() {
const currentScrollPos = window.pageYOffset const currentScrollPos = window.pageYOffset
if (this.prevScrollpos > currentScrollPos) { if (this.prevScrollpos > 50) {
this.hideByScroll = false if (this.prevScrollpos > currentScrollPos) {
} else { this.hideByScroll = false
if (!this.showFilter) { } else {
this.hideByScroll = true if (!this.showFilter) {
this.hideByScroll = true
}
} }
} }
this.prevScrollpos = currentScrollPos this.prevScrollpos = currentScrollPos