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: