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