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: {
|
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
|
||||||
},
|
},
|
||||||
|
|||||||
@ -214,11 +214,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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user