mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Prevent vertical scrolling on swipe
This commit is contained in:
parent
3b018bc6bf
commit
3f31744911
2 changed files with 6 additions and 4 deletions
|
@ -60,6 +60,8 @@ class TouchHandler {
|
|||
|
||||
this.touch.element.style.opacity = opacity;
|
||||
this.touch.element.style.transform = "translateX(" + tx + "px)";
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,7 +89,7 @@ class TouchHandler {
|
|||
|
||||
elements.forEach((element) => {
|
||||
element.addEventListener("touchstart", (e) => this.onTouchStart(e), hasPassiveOption ? { passive: true } : false);
|
||||
element.addEventListener("touchmove", (e) => this.onTouchMove(e), hasPassiveOption ? { passive: true } : false);
|
||||
element.addEventListener("touchmove", (e) => this.onTouchMove(e), hasPassiveOption ? { passive: false } : false);
|
||||
element.addEventListener("touchend", (e) => this.onTouchEnd(e), hasPassiveOption ? { passive: true } : false);
|
||||
element.addEventListener("touchcancel", () => this.reset(), hasPassiveOption ? { passive: true } : false);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue