diff --git a/src/pyj/book_list/book_details.pyj b/src/pyj/book_list/book_details.pyj index b9092a266d..d5009b405b 100644 --- a/src/pyj/book_list/book_details.pyj +++ b/src/pyj/book_list/book_details.pyj @@ -449,6 +449,7 @@ def check_for_books_loaded(): def init(container_id): container = document.getElementById(container_id) create_top_bar(container, title=_('Book details'), action=back, icon='close') + window.scrollTo(0, 0) # Ensure we are at the top of the window container.appendChild(E.div(class_=CLASS_NAME)) container.lastChild.appendChild(E.div(_('Loading books from the calibre library, please wait...'), style='margin: 1ex 1em')) conditional_timeout(container_id, 5, check_for_books_loaded) diff --git a/src/pyj/read_book/ui.pyj b/src/pyj/read_book/ui.pyj index dfe389ffb4..284c592e6c 100644 --- a/src/pyj/read_book/ui.pyj +++ b/src/pyj/read_book/ui.pyj @@ -415,6 +415,7 @@ class ReadUI: current_state = self.url_data same = current_query.library_id is current_state.library_id and str(current_query.book_id) is str(current_state.book_id) and current_query.fmt is current_state.fmt self.view.overlay.hide() + window.scrollTo(0, 0) # Ensure we are at the top of the window if same: if current_state.bookpos is not current_query.bookpos and current_query.bookpos: self.view.goto_bookpos(current_query.bookpos)