Fix inverted probe collapse in the touch selection clamp

This commit is contained in:
John O'Keefe
2026-09-13 18:32:58 -04:00
parent cae618ac87
commit 800fb2fa02
+1 -1
View File
@@ -981,7 +981,7 @@ export class Paginator extends HTMLElement {
if (!sel.rangeCount) return if (!sel.rangeCount) return
const backward = selectionIsBackward(sel) const backward = selectionIsBackward(sel)
const probe = sel.getRangeAt(0).cloneRange() const probe = sel.getRangeAt(0).cloneRange()
probe.collapse(!backward) probe.collapse(backward)
const rect = probe.getBoundingClientRect() const rect = probe.getBoundingClientRect()
if (!rect || (rect.width === 0 && rect.height === 0 && !rect.x && !rect.y)) if (!rect || (rect.width === 0 && rect.height === 0 && !rect.x && !rect.y))
return return