mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Prevent default actions for all recognized shortcuts not just navigation ones
This commit is contained in:
parent
a7789552df
commit
639c0e1ecc
@ -617,9 +617,8 @@ class IframeBoss:
|
|||||||
if self.content_ready:
|
if self.content_ready:
|
||||||
sc_name = shortcut_for_key_event(evt, self.keyboard_shortcut_map)
|
sc_name = shortcut_for_key_event(evt, self.keyboard_shortcut_map)
|
||||||
if sc_name:
|
if sc_name:
|
||||||
if self.handle_navigation_shortcut(sc_name, evt):
|
evt.preventDefault()
|
||||||
evt.preventDefault()
|
if not self.handle_navigation_shortcut(sc_name, evt):
|
||||||
else:
|
|
||||||
self.send_message('handle_shortcut', name=sc_name)
|
self.send_message('handle_shortcut', name=sc_name)
|
||||||
|
|
||||||
def on_handle_navigation_shortcut(self, data):
|
def on_handle_navigation_shortcut(self, data):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user