mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont interfere with the default forward and back shortcuts in the browser
This commit is contained in:
parent
86dc78eb52
commit
49d1ea8bb2
@ -75,7 +75,7 @@ def flow_onkeydown(evt):
|
||||
goto_boundary(-1 if key is 'up' else 1)
|
||||
else:
|
||||
smooth_y_scroll(key is 'up')
|
||||
elif key is 'left' or key is 'right':
|
||||
elif (key is 'left' or key is 'right') and not evt.altKey:
|
||||
handled = True
|
||||
if evt.ctrlKey:
|
||||
window.scrollTo(0 if key is 'left' else document_width(), window.pageYOffset)
|
||||
|
@ -397,9 +397,9 @@ def snap_to_selection():
|
||||
# selection
|
||||
scroll_to_xpos(left+5)
|
||||
|
||||
def jump_to_cfi(cfi, job_id=-1):
|
||||
def jump_to_cfi(cfi):
|
||||
# Jump to the position indicated by the specified conformal fragment
|
||||
# indicator (requires the cfi.coffee library). When in paged mode, the
|
||||
# indicator. When in paged mode, the
|
||||
# scroll is performed so that the column containing the position
|
||||
# pointed to by the cfi is the left most column in the viewport
|
||||
cfi_scroll_to(cfi, def(x, y):
|
||||
@ -407,8 +407,6 @@ def jump_to_cfi(cfi, job_id=-1):
|
||||
scroll_to_xpos(x)
|
||||
else:
|
||||
window.scrollTo(0, y)
|
||||
# if window.py_bridge
|
||||
# window.py_bridge.jump_to_cfi_finished(job_id)
|
||||
)
|
||||
|
||||
def current_cfi():
|
||||
@ -472,7 +470,7 @@ def onkeydown(evt):
|
||||
window.scrollTo(0 if key is 'left' else document_width(), 0)
|
||||
else:
|
||||
scroll_by_page(key is 'up', True)
|
||||
elif key is 'left' or key is 'right':
|
||||
elif (key is 'left' or key is 'right') and not evt.altKey:
|
||||
handled = True
|
||||
if evt.ctrlKey:
|
||||
window.scrollTo(0 if key is 'left' else document_width(), 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user