mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-21 14:49:51 -04:00
Fix inverted probe collapse in the touch selection clamp
This commit is contained in:
1 parent
cae618ac87
commit
800fb2fa02
1 file changed
+1
-1
+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