Dont try to cancel non cancelable event

This commit is contained in:
Kovid Goyal 2023-02-02 21:29:32 +05:30
parent 3121517b51
commit 3b924ecb04
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -213,7 +213,8 @@ class TouchHandler:
self.reset_handlers()
def handle_touchcancel(self, ev):
ev.preventDefault(), ev.stopPropagation()
if ev.cancelable:
ev.preventDefault(), ev.stopPropagation()
for touch in ev.changedTouches:
tid = touch_id(touch) # noqa: unused-local
v'delete self.ongoing_touches[tid]'