From 61db26fdde129afc77bb56c302790c8af6f35c44 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Mon, 30 May 2022 17:36:39 +0300 Subject: [PATCH] fix(autoplay): fix swiper getting stuck with `0` autoplay delay --- src/modules/autoplay/autoplay.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/autoplay/autoplay.js b/src/modules/autoplay/autoplay.js index cb6609dd9..fb07f8cf8 100644 --- a/src/modules/autoplay/autoplay.js +++ b/src/modules/autoplay/autoplay.js @@ -131,6 +131,10 @@ export default function Autoplay({ swiper, extendParams, on, emit }) { swiper.autoplay.paused = false; if (!swiper.autoplay.running) { stop(); + } else if (swiper.params.autoplay.delay === 0 && swiper.animating) { + swiper.once('transitionEnd', () => { + run(); + }); } else { run(); }