Skip to content

Commit

Permalink
fix(core): proceed iOS's pointercancel as pointerup
Browse files Browse the repository at this point in the history
fixes #6414
fixes #6382
  • Loading branch information
nolimits4web committed Feb 27, 2023
1 parent 086702e commit 50b65f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/events/onTouchEnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

1 comment on commit 50b65f6

@guillermodlpa
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix! 🙌

Please sign in to comment.