From aabe59dd5425887bd17d21f88b355e79a52480f2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 2 Apr 2021 12:30:40 +0530 Subject: [PATCH] Fix #1922301 [Epub viewer selection error](https://bugs.launchpad.net/calibre/+bug/1922301) --- src/pyj/range_utils.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/range_utils.pyj b/src/pyj/range_utils.pyj index 4c1ff839a0..15b6a2821c 100644 --- a/src/pyj/range_utils.pyj +++ b/src/pyj/range_utils.pyj @@ -190,7 +190,7 @@ def get_annot_id_for(node, offset, annot_id_uuid_map): return annot_id_uuid_map[node.firstChild.dataset.calibreRangeWrapper] elif offset < node.childNodes.length: 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: if node.parentNode?.nodeType is Node.ELEMENT_NODE and node.parentNode.dataset.calibreRangeWrapper: return annot_id_uuid_map[node.parentNode.dataset.calibreRangeWrapper]