From 7af89102815a76c38ffde26b0dcd419c78ed4d7c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 20 Apr 2023 17:58:29 +0530 Subject: [PATCH] E-book viewer: Fix a regression that caused notes from a different highlights to be shown in some situations. Fixes #2017130 [Private bug](https://bugs.launchpad.net/calibre/+bug/2017130) --- 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 fb2c712037..7a070a35dd 100644 --- a/src/pyj/range_utils.pyj +++ b/src/pyj/range_utils.pyj @@ -32,7 +32,7 @@ def first_annot_in_range(r, annot_id_uuid_map): parent = r.commonAncestorContainer doc = parent.ownerDocument or document is_full_tree = parent is doc.documentElement - in_range = not is_full_tree + in_range = is_full_tree iterator = doc.createNodeIterator(parent) while True: node = iterator.nextNode()