Viewer: Fix clicking on margins causing keyboard shortcuts to not work until the main text is clicked on again

This commit is contained in:
Kovid Goyal 2019-10-06 12:34:11 +05:30
parent 87be626af7
commit cd2049befd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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: