From 50b65f622966b788bb586ddadc4ccf9c8b4291f3 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Mon, 27 Feb 2023 16:28:57 +0300 Subject: [PATCH] fix(core): proceed iOS's pointercancel as pointerup fixes #6414 fixes #6382 --- src/core/events/onTouchEnd.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/events/onTouchEnd.js b/src/core/events/onTouchEnd.js index 357c320f9..a29c261a1 100644 --- a/src/core/events/onTouchEnd.js +++ b/src/core/events/onTouchEnd.js @@ -7,7 +7,13 @@ export default function onTouchEnd(event) { if (pointerIndex >= 0) { data.evCache.splice(pointerIndex, 1); } - if (['pointercancel', 'pointerout', 'pointerleave'].includes(event.type)) return; + if (['pointercancel', 'pointerout', 'pointerleave'].includes(event.type)) { + const proceed = + event.type === 'pointercancel' && (swiper.browser.isSafari || swiper.browser.isWebView); + if (!proceed) { + return; + } + } const { params, touches, rtlTranslate: rtl, slidesGrid, enabled } = swiper; if (!enabled) return;