From 3b924ecb04de8f382302a6fb031af70a36f6b1dd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 2 Feb 2023 21:29:32 +0530 Subject: [PATCH] Dont try to cancel non cancelable event --- src/pyj/read_book/touch.pyj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/touch.pyj b/src/pyj/read_book/touch.pyj index b26c11f642..4265d0a846 100644 --- a/src/pyj/read_book/touch.pyj +++ b/src/pyj/read_book/touch.pyj @@ -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]'