From 3634a76107f2e7be65b69273e4c3ce088d6d9337 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 18 Feb 2017 15:28:06 +0530 Subject: [PATCH] Ensure overlay is hidden when opening book --- src/pyj/read_book/overlay.pyj | 1 + src/pyj/read_book/ui.pyj | 1 + src/pyj/read_book/view.pyj | 1 + 3 files changed, 3 insertions(+) diff --git a/src/pyj/read_book/overlay.pyj b/src/pyj/read_book/overlay.pyj index fa9b6f9868..032f6c16bd 100644 --- a/src/pyj/read_book/overlay.pyj +++ b/src/pyj/read_book/overlay.pyj @@ -325,6 +325,7 @@ class Overlay: def hide(self): while self.panels.length: self.hide_current_panel() + self.container.style.display = 'none' def delete_book(self): self.hide_current_panel() diff --git a/src/pyj/read_book/ui.pyj b/src/pyj/read_book/ui.pyj index 3c094a003d..72fba3a04c 100644 --- a/src/pyj/read_book/ui.pyj +++ b/src/pyj/read_book/ui.pyj @@ -414,6 +414,7 @@ class ReadUI: if str(current_query[k]) is not str(current_state[k]): same = False break + self.view.overlay.hide() if same: if current_state.bookpos is not current_query.bookpos and current_query.bookpos: self.view.goto_bookpos(current_query.bookpos) diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index f3e833d110..1bc138528f 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -280,6 +280,7 @@ class View: return name, cfi def display_book(self, book): + self.overlay.hide() self.book = current_book.book = book self.ui.db.update_last_read_time(book) self.loaded_resources = {}