mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-01 07:49:12 -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
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user