mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-30 23:49:10 -04:00
Fix inverted probe collapse in the touch selection clamp
This commit is contained in:
+1
-1
@@ -981,7 +981,7 @@ export class Paginator extends HTMLElement {
|
||||
if (!sel.rangeCount) return
|
||||
const backward = selectionIsBackward(sel)
|
||||
const probe = sel.getRangeAt(0).cloneRange()
|
||||
probe.collapse(!backward)
|
||||
probe.collapse(backward)
|
||||
const rect = probe.getBoundingClientRect()
|
||||
if (!rect || (rect.width === 0 && rect.height === 0 && !rect.x && !rect.y))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user