E-book viewer: Fix popup footnote blank when the footnote link points to a <body> tag. Fixes #1943270 [Private bug](https://bugs.launchpad.net/calibre/+bug/1943270)

This commit is contained in:
Kovid Goyal 2021-09-22 08:59:18 +05:30
parent 27b06b16b1
commit 8c18cba3a7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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: