diff --git a/src/calibre/gui2/tweak_book/preview.py b/src/calibre/gui2/tweak_book/preview.py index 29c0ea8fe5..397cfcdd59 100644 --- a/src/calibre/gui2/tweak_book/preview.py +++ b/src/calibre/gui2/tweak_book/preview.py @@ -289,6 +289,8 @@ class WebPage(QWebEnginePage): return False def go_to_anchor(self, anchor): + if anchor is TOP: + anchor = '' self.bridge.go_to_anchor.emit(anchor or '') def runjs(self, src, callback=None):