mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Merge pull request #5957 from Ocelot-Social-Community/5953-navbar-disappears-when-scrolling-to-top
fix(webapp): navbar disappears when scrolling to top
This commit is contained in:
commit
982257b5f3
@ -309,10 +309,12 @@ export default {
|
||||
methods: {
|
||||
handleScroll() {
|
||||
const currentScrollPos = window.pageYOffset
|
||||
if (this.prevScrollpos > currentScrollPos) {
|
||||
this.hideNavbar = false
|
||||
} else {
|
||||
this.hideNavbar = true
|
||||
if (this.prevScrollpos > 50) {
|
||||
if (this.prevScrollpos > currentScrollPos) {
|
||||
this.hideNavbar = false
|
||||
} else {
|
||||
this.hideNavbar = true
|
||||
}
|
||||
}
|
||||
this.prevScrollpos = currentScrollPos
|
||||
},
|
||||
|
||||
@ -214,11 +214,13 @@ export default {
|
||||
},
|
||||
handleScroll() {
|
||||
const currentScrollPos = window.pageYOffset
|
||||
if (this.prevScrollpos > currentScrollPos) {
|
||||
this.hideByScroll = false
|
||||
} else {
|
||||
if (!this.showFilter) {
|
||||
this.hideByScroll = true
|
||||
if (this.prevScrollpos > 50) {
|
||||
if (this.prevScrollpos > currentScrollPos) {
|
||||
this.hideByScroll = false
|
||||
} else {
|
||||
if (!this.showFilter) {
|
||||
this.hideByScroll = true
|
||||
}
|
||||
}
|
||||
}
|
||||
this.prevScrollpos = currentScrollPos
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user