From 422e8e0ec0e61e5d0c6d6e2fa1d777f48d8a1175 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 15 Sep 2026 12:56:08 -0400 Subject: [PATCH] Don't snap on taps that never panned A tap goes through #onTouchEnd's snap, which emits a no-op relocate; readers treat any relocate as a page turn and dismiss popovers, so the highlight edit popover opened by the tap's synthetic click was immediately hidden. --- paginator.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paginator.js b/paginator.js index 9adc0f8..63364f9 100644 --- a/paginator.js +++ b/paginator.js @@ -994,8 +994,13 @@ export class Paginator extends HTMLElement { this.scrollBy(dx, dy) } #onTouchEnd() { + const wasScrolled = this.#touchScrolled this.#touchScrolled = false if (this.scrolled || this.#touchSelActive) return + // A touch that never panned (a tap) is already page-aligned; + // snapping anyway emits a no-op relocate, which readers treat + // as a page turn (e.g. dismissing a just-opened popover). + if (!wasScrolled) return // XXX: Firefox seems to report scale as 1... sometimes...? // at this point I'm basically throwing `requestAnimationFrame` at