mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1922301 [Epub viewer selection error](https://bugs.launchpad.net/calibre/+bug/1922301)
This commit is contained in:
parent
00b596afb2
commit
aabe59dd54
@ -190,7 +190,7 @@ def get_annot_id_for(node, offset, annot_id_uuid_map):
|
|||||||
return annot_id_uuid_map[node.firstChild.dataset.calibreRangeWrapper]
|
return annot_id_uuid_map[node.firstChild.dataset.calibreRangeWrapper]
|
||||||
elif offset < node.childNodes.length:
|
elif offset < node.childNodes.length:
|
||||||
node = node.childNodes[offset]
|
node = node.childNodes[offset]
|
||||||
return get_annot_id_for(node, 0)
|
return get_annot_id_for(node, 0, annot_id_uuid_map)
|
||||||
elif node.nodeType is Node.TEXT_NODE:
|
elif node.nodeType is Node.TEXT_NODE:
|
||||||
if node.parentNode?.nodeType is Node.ELEMENT_NODE and node.parentNode.dataset.calibreRangeWrapper:
|
if node.parentNode?.nodeType is Node.ELEMENT_NODE and node.parentNode.dataset.calibreRangeWrapper:
|
||||||
return annot_id_uuid_map[node.parentNode.dataset.calibreRangeWrapper]
|
return annot_id_uuid_map[node.parentNode.dataset.calibreRangeWrapper]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user