From 9ad2ff85815b2b42ba89dde6e6423bed5a1cbcc4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 18 May 2017 10:03:22 +0530 Subject: [PATCH] Browser reader: Fix clicking links with no anchors not always scrolling going to the top of the linked file --- src/pyj/read_book/iframe.pyj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyj/read_book/iframe.pyj b/src/pyj/read_book/iframe.pyj index ff401b7549..3b589285be 100644 --- a/src/pyj/read_book/iframe.pyj +++ b/src/pyj/read_book/iframe.pyj @@ -353,6 +353,8 @@ class IframeBoss: elem = c[0] if elem: scroll_to_elem(elem) + else: + window.scrollTo(0, 0) def find(self, data, from_load): if data.searched_in_spine: