Fix touch events not being recognized on Safari

This commit is contained in:
Kovid Goyal 2017-05-27 13:37:22 +05:30
parent b40031caf0
commit e2da5ecd0a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@ -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)