From cd2049befd7d0e057264f6a51820fd52252e8c76 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 6 Oct 2019 12:34:11 +0530 Subject: [PATCH] Viewer: Fix clicking on margins causing keyboard shortcuts to not work until the main text is clicked on again --- src/pyj/read_book/view.pyj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index a66385100b..b4a86430a7 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -227,12 +227,14 @@ class View: event.preventDefault(), event.stopPropagation() sd = get_session_data() self.iframe_wrapper.send_message('next_screen', backwards=True, all_pages_on_screen=sd.get('paged_margin_clicks_scroll_by_screen')) + self.focus_iframe() def right_margin_clicked(self, event): if event.button is 0: event.preventDefault(), event.stopPropagation() sd = get_session_data() self.iframe_wrapper.send_message('next_screen', backwards=False, all_pages_on_screen=sd.get('paged_margin_clicks_scroll_by_screen')) + self.focus_iframe() def top_margin_clicked(self, event): if event.button is 0: