Closed allanchao closed 2 years ago
https://getbootstrap.com/docs/5.2/components/carousel/#disable-touch-swiping
Disable touch swiping
Carousels support swiping left/right on touchscreen devices to move between slides. This can be disabled using the data-bs-touch attribute. The example below also does not include the data-bs-ride attribute and has data-bs-interval="false" so it doesn’t autoplay.
Your codepen example contains data-bs-ride="carousel" data-bs-wrap="true" data-bs-interval="false"
. So at least you have to remove data-bs-ride
at least. Right?
As for the documentation, maybe could be more descriptive
Prerequisites
Describe the issue
In 5.2.0-beta1 (as compared to 5.1.3), the carousel has different behavior when specified with data-bs-interval="false"
In 5.1.3, it disables auto scroll
In 5.2.0-beta1, it scrolls instantly
I believe this is a bug, as the docs still say that it should disable auto scroll https://getbootstrap.com/docs/5.2/components/carousel/#disable-touch-swiping
Reduced test cases
https://codepen.io/comicsanscoder/pen/QWQVJbq
(switching js between 5.2.0-beta1 and 5.1.3 demonstrates the bug)
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
5.2.0-beta1