Carousel: No listeners for mobile carousels with `data-bs-ride=boolean`
See original GitHub issuePrerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
Describe the issue
Seems to be there for quite a long time.
The main issue is that if data-bs-ride
is set to anything but carousel
, the constructor()
isn’t called (whereas there’s a check inside to avoid launch cycle()
). This leads to unset (at least) touch listeners which, in mobile views, is kinda weird IMO.
I don’t have the time to test it atm, but I think there’s only a change on the selector would do the trick ?
Reduced test cases
Go on https://twbs-bootstrap.netlify.app/docs/5.2/components/carousel/#with-controls (which works well with mobile listeners) Go on https://twbs-bootstrap.netlify.app/docs/5.2/components/carousel/#with-indicators (which is broken with mobile listeners until we click one button)
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome, Firefox
What version of Bootstrap are you using?
5.2.2 (current_main_branch)
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:14 (12 by maintainers)
Top Results From Across the Web
Mobile Carousels | Intercom
Send dynamic carousel messages that prompt users to enable push notifications, location services, camera access, and more—even after they've been onboarded.
Read more >Carousels on Mobile Devices - Nielsen Norman Group
Zara.com used no carousel signifiers to indicate to users that they can access more content by swiping horizontally. The carousel was self- ...
Read more >Accessible Mobile Carousels - Mobile Office Hours – April 2019
Watch this technical discussion about our learnings from implementing an Accessible Android Carousel and why user empathy was our biggest ...
Read more >Mobile Carousels by Intercom - YouTube
Perfect for onboarding and mobile adoption, use Mobile Carousels to welcome new users to your mobile app, make announcements, request device ...
Read more >Mobile friendly carousel with touch and pointer events
Note: The touchdown and touchup in this tutorial should be replaced by touchstart and touchend!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i think it’s even simpler than that: no need to check if there’s a
data-bs-ride
attribute at all, just attach the touch listeners on initialisation, all the time, just like with mouse listeners. touch functionality is not dependent on whether it autoscrolls or scrolls after first interaction.ah yes, event listeners should all register at the same time at initialisation, not just after first interaction