fix(reader): disable tap-to-turn-page on mobile devices

This commit is contained in:
ACX
2026-02-10 21:54:58 -07:00
committed by acx10
parent 20e73bd108
commit 574bfdbe7a

View File

@@ -451,11 +451,13 @@ export class ReaderEventService {
const leftThreshold = width * this.LEFT_ZONE_PERCENT;
const rightThreshold = width * this.RIGHT_ZONE_PERCENT;
if (x < leftThreshold) {
const isMobile = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
if (x < leftThreshold && !isMobile) {
this.isNavigating = true;
this.viewCallbacks?.prev();
setTimeout(() => this.isNavigating = false, 300);
} else if (x > rightThreshold) {
} else if (x > rightThreshold && !isMobile) {
this.isNavigating = true;
this.viewCallbacks?.next();
setTimeout(() => this.isNavigating = false, 300);