mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix touch events not being recognized on Safari
This commit is contained in:
parent
b40031caf0
commit
e2da5ecd0a
Binary file not shown.
@ -274,7 +274,9 @@ def install_handlers(elem, handler):
|
|||||||
elem.addEventListener('touchcancel', handler.handle_touchcancel, options)
|
elem.addEventListener('touchcancel', handler.handle_touchcancel, options)
|
||||||
|
|
||||||
def create_handlers():
|
def create_handlers():
|
||||||
install_handlers(window, main_touch_handler)
|
# Safari does not work if we register the handler
|
||||||
|
# on window instead of document
|
||||||
|
install_handlers(document, main_touch_handler)
|
||||||
|
|
||||||
def set_left_margin_handler(elem):
|
def set_left_margin_handler(elem):
|
||||||
install_handlers(elem, left_margin_handler)
|
install_handlers(elem, left_margin_handler)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user