mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle Chrome changing window level touch even handlers to passive by default in newer releases
This commit is contained in:
parent
5b2f202a2c
commit
5b3d7c04cf
@ -267,10 +267,11 @@ left_margin_handler = BookTouchHandler('left')
|
||||
right_margin_handler = BookTouchHandler('right')
|
||||
|
||||
def install_handlers(elem, handler):
|
||||
elem.addEventListener('touchstart', handler.handle_touchstart, True)
|
||||
elem.addEventListener('touchmove', handler.handle_touchmove, True)
|
||||
elem.addEventListener('touchend', handler.handle_touchend, True)
|
||||
elem.addEventListener('touchcancel', handler.handle_touchcancel, True)
|
||||
options = {'capture': True, 'passive': False}
|
||||
elem.addEventListener('touchstart', handler.handle_touchstart, options)
|
||||
elem.addEventListener('touchmove', handler.handle_touchmove, options)
|
||||
elem.addEventListener('touchend', handler.handle_touchend, options)
|
||||
elem.addEventListener('touchcancel', handler.handle_touchcancel, options)
|
||||
|
||||
def create_handlers():
|
||||
install_handlers(window, main_touch_handler)
|
||||
|
Loading…
x
Reference in New Issue
Block a user