mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-10-24 15:28:53 -04:00
E-book viewer: Fix placement of selection handles in some books when modifying an existing highlight
This commit is contained in:
parent
8db3e0f996
commit
81475dad84
@ -124,11 +124,11 @@ def range_extents(q, in_flow_mode):
|
||||
if boundary_node:
|
||||
if boundary_node.nodeType is Node.TEXT_NODE:
|
||||
if is_start:
|
||||
r.setStart(boundary_node, boundary_node.length - 1)
|
||||
r.setEnd(boundary_node, boundary_node.length)
|
||||
else:
|
||||
r.setStart(boundary_node, 0)
|
||||
r.setEnd(boundary_node, 1)
|
||||
r.setEnd(boundary_node, 0)
|
||||
else:
|
||||
r.setStart(boundary_node, boundary_node.length)
|
||||
r.setEnd(boundary_node, boundary_node.length)
|
||||
rect = r.getBoundingClientRect()
|
||||
else:
|
||||
rect = boundary_node.getBoundingClientRect()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user