mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont allow navigation shortcuts in read aloud overlays
They are pointless as the selection is changed causing a scroll as words are read
This commit is contained in:
parent
8aa739985a
commit
2503f2427c
@ -1004,8 +1004,6 @@ class IframeBoss:
|
||||
sel = window.getSelection()
|
||||
sel.removeAllRanges()
|
||||
self.send_message('tts', type='text-extracted', marked_text=marked_text, pos=data.pos)
|
||||
elif data.type is 'trigger-shortcut':
|
||||
self.on_handle_navigation_shortcut(data)
|
||||
|
||||
def mark_word_being_spoken(self, occurrence_number):
|
||||
self.last_search_at = window.performance.now()
|
||||
@ -1034,8 +1032,6 @@ class IframeBoss:
|
||||
else:
|
||||
par = smil_element_at(data.pos, self.smil_anchor_map, self.smil_par_list)
|
||||
self.send_message('audio_ebook_message', type='start_play_at', par=par or None, anchor=data.anchor or None)
|
||||
elif data.type is 'trigger_shortcut':
|
||||
self.on_handle_navigation_shortcut(data)
|
||||
else:
|
||||
console.error(f'Unknown audio ebook message type from main: {data.type}')
|
||||
|
||||
|
@ -226,8 +226,6 @@ class ReadAloud:
|
||||
elif sc_name is 'quit':
|
||||
self.hide()
|
||||
ui_operations.quit()
|
||||
elif sc_name in ('up', 'down', 'pageup', 'pagedown', 'left', 'right'):
|
||||
self.send_message('trigger-shortcut', name=sc_name)
|
||||
|
||||
def handle_tts_event(self, which, data):
|
||||
if which is 'mark':
|
||||
|
@ -329,8 +329,6 @@ class ReadAudioEbook:
|
||||
self.hide()
|
||||
elif sc_name is "quit":
|
||||
self.hide()
|
||||
elif sc_name in ("up", "down", "pageup", "pagedown", "left", "right"):
|
||||
self.send_message("trigger_shortcut", name=sc_name)
|
||||
|
||||
def send_message(self, message_type, **kw):
|
||||
self.view.iframe_wrapper.send_message("audio-ebook", type=message_type, **kw)
|
||||
|
Loading…
x
Reference in New Issue
Block a user