From 1bd7e52417ab2a0093bf9d949c8f47ca3dc5ba5f Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 13 Sep 2026 20:19:26 -0400 Subject: [PATCH] Repair backward word clipping with extend, not setBaseAndExtent Rewriting both selection boundaries mid-gesture detaches Chrome's touch selection controller and the selection stops following the finger. extend() moves only the focus, which the controller tolerates. --- paginator.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paginator.js b/paginator.js index b97565e..dd82e8a 100644 --- a/paginator.js +++ b/paginator.js @@ -630,8 +630,7 @@ export class Paginator extends HTMLElement { if (r.compareBoundaryPoints(Range.START_TO_START, probe) <= 0) return if (selectionIsBackward(sel)) - sel.setBaseAndExtent(sel.anchorNode, sel.anchorOffset, - probe.startContainer, probe.startOffset) + sel.extend(probe.startContainer, probe.startOffset) else sel.setBaseAndExtent(probe.startContainer, probe.startOffset, sel.focusNode, sel.focusOffset)