From 8c18cba3a744afbc1013c04cf45eae638932708e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 22 Sep 2021 08:59:18 +0530 Subject: [PATCH] E-book viewer: Fix popup footnote blank when the footnote link points to a tag. Fixes #1943270 [Private bug](https://bugs.launchpad.net/calibre/+bug/1943270) --- src/pyj/read_book/footnotes.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/read_book/footnotes.pyj b/src/pyj/read_book/footnotes.pyj index 9a48ca783e..7c14bad2b3 100644 --- a/src/pyj/read_book/footnotes.pyj +++ b/src/pyj/read_book/footnotes.pyj @@ -160,7 +160,7 @@ def show_footnote(target, known_anchors): else: # Try to detect natural boundaries based on markup for this note found_note_start = False - for elem in document.body.getElementsByTagName('*'): + for elem in document.documentElement.getElementsByTagName('*'): if found_note_start: eid = elem.getAttribute('id') if eid is not target and known_anchors[eid] and get_note_container(elem) is not start_elem: