Commit 45a3d2c5 by FE

search position question

parent 56ac421b
......@@ -76,8 +76,9 @@ class SearchResult extends PureComponent {
}
handleScroll = throttle(() => {
let y = window.scrollY, headY = this.searchHead.current.offsetTop
if (y < this.prevScrollY) {
let y = window.scrollY,
headY = this.searchHead.current.offsetTop;
if (y < this.prevScrollY && y > 0) {
if (this.state.swipeDirection === this.swipeDown) {
......@@ -114,7 +115,7 @@ class SearchResult extends PureComponent {
})
}
this.prevScrollY = y
this.prevScrollY = y;
}, 0)
render() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment