|
@@ -744,11 +744,13 @@ class Search {
|
|
}
|
|
}
|
|
|
|
|
|
onScroll() {
|
|
onScroll() {
|
|
- if (this.ignoreScrolling)
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
const curScrollTop = this.$refs.scroller.scrollTop;
|
|
const curScrollTop = this.$refs.scroller.scrollTop;
|
|
|
|
|
|
|
|
+ if (this.ignoreScrolling) {
|
|
|
|
+ this.lastScrollTop = curScrollTop;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!this.lastScrollTop)
|
|
if (!this.lastScrollTop)
|
|
this.lastScrollTop = 0;
|
|
this.lastScrollTop = 0;
|
|
if (!this.lastScrollTop2)
|
|
if (!this.lastScrollTop2)
|
|
@@ -756,6 +758,9 @@ class Search {
|
|
|
|
|
|
if (curScrollTop - this.lastScrollTop > 0) {
|
|
if (curScrollTop - this.lastScrollTop > 0) {
|
|
this.$refs.toolPanel.style.position = 'relative';
|
|
this.$refs.toolPanel.style.position = 'relative';
|
|
|
|
+ if (this.lastScrollTop2 <= curScrollTop - this.$refs.toolPanel.clientHeight)
|
|
|
|
+ this.lastScrollTop2 = 0;
|
|
|
|
+
|
|
this.$refs.toolPanel.style.top = `${this.lastScrollTop2}px`;
|
|
this.$refs.toolPanel.style.top = `${this.lastScrollTop2}px`;
|
|
} else {
|
|
} else {
|
|
this.$refs.toolPanel.style.position = 'sticky';
|
|
this.$refs.toolPanel.style.position = 'sticky';
|