From 639c0e1ecc06ffa5da1bd9d4f1cef98d503ba069 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 13 Sep 2020 09:57:40 +0530 Subject: [PATCH] Prevent default actions for all recognized shortcuts not just navigation ones --- src/pyj/read_book/iframe.pyj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pyj/read_book/iframe.pyj b/src/pyj/read_book/iframe.pyj index 5b1eb777ef..bebe72b569 100644 --- a/src/pyj/read_book/iframe.pyj +++ b/src/pyj/read_book/iframe.pyj @@ -617,9 +617,8 @@ class IframeBoss: if self.content_ready: sc_name = shortcut_for_key_event(evt, self.keyboard_shortcut_map) if sc_name: - if self.handle_navigation_shortcut(sc_name, evt): - evt.preventDefault() - else: + evt.preventDefault() + if not self.handle_navigation_shortcut(sc_name, evt): self.send_message('handle_shortcut', name=sc_name) def on_handle_navigation_shortcut(self, data):