From 600f71fda6941f6d8257a9f85e9600e4e70cc2c9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 10 Jul 2019 14:13:56 +0530 Subject: [PATCH] Fix preview going to top anchor not working --- src/calibre/gui2/tweak_book/preview.py | 2 ++ 1 file changed, 2 insertions(+) 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):