Make listeners passive
parent
af5e3ef105
commit
32bc48418f
|
@ -8,10 +8,10 @@
|
||||||
'scrolling-now': scrollingNowTimer,
|
'scrolling-now': scrollingNowTimer,
|
||||||
scrolling: scrollingTimer,
|
scrolling: scrollingTimer,
|
||||||
}"
|
}"
|
||||||
@mousemove="mousemove"
|
@mousemove.passive="mousemove"
|
||||||
@touchmove="touchmove"
|
@touchmove.passive="touchmove"
|
||||||
@mouseleave="mouseleave"
|
@mouseleave.passive="mouseleave"
|
||||||
@mousedown="mousedown"
|
@mousedown.passive="mousedown"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="cursor st"
|
class="cursor st"
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<span
|
<span
|
||||||
class="cursor hv"
|
class="cursor hv"
|
||||||
:style="{ transform: `translateY(${hoverCursorY}px)` }"
|
:style="{ transform: `translateY(${hoverCursorY}px)` }"
|
||||||
@touchmove="touchmove"
|
@touchmove.passive="touchmove"
|
||||||
>
|
>
|
||||||
<div class="text">{{ hoverCursorText }}</div>
|
<div class="text">{{ hoverCursorText }}</div>
|
||||||
<div class="icon"><ScrollIcon :size="22" /></div>
|
<div class="icon"><ScrollIcon :size="22" /></div>
|
||||||
|
|
|
@ -271,7 +271,7 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
|
||||||
(this.$refs.recycler as any).$el.addEventListener(
|
(this.$refs.recycler as any).$el.addEventListener(
|
||||||
"scroll",
|
"scroll",
|
||||||
this.scrollPositionChange,
|
this.scrollPositionChange,
|
||||||
false
|
{ passive: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get data
|
// Get data
|
||||||
|
|
|
@ -22,10 +22,10 @@
|
||||||
class="img-outer fill-block"
|
class="img-outer fill-block"
|
||||||
@click="emitClick"
|
@click="emitClick"
|
||||||
@contextmenu="contextmenu"
|
@contextmenu="contextmenu"
|
||||||
@touchstart="touchstart"
|
@touchstart.passive="touchstart"
|
||||||
@touchmove="touchend"
|
@touchmove.passive="touchend"
|
||||||
@touchend="touchend"
|
@touchend.passive="touchend"
|
||||||
@touchcancel="touchend"
|
@touchcancel.passive="touchend"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
ref="img"
|
ref="img"
|
||||||
|
|
|
@ -93,7 +93,9 @@ export default class OnThisDay extends Mixins(GlobalMixin) {
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
const inner = this.$refs.inner as HTMLElement;
|
const inner = this.$refs.inner as HTMLElement;
|
||||||
inner.addEventListener("scroll", this.onScroll.bind(this));
|
inner.addEventListener("scroll", this.onScroll.bind(this), {
|
||||||
|
passive: true,
|
||||||
|
});
|
||||||
|
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue