Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: carousel data-touch="false" not working #32629

Closed
patrickhlauke opened this issue Dec 27, 2020 · 6 comments
Closed

Regression: carousel data-touch="false" not working #32629

patrickhlauke opened this issue Dec 27, 2020 · 6 comments

Comments

@patrickhlauke
Copy link
Member

patrickhlauke commented Dec 27, 2020

A fresh version of this #28025 (comment)

It seems somehow the code that was added here #28046 has been lost at some point.

[edit: correction, as @rohit2sharma95 pointed out, the code is actually still there - i somehow managed to miss it while checking the code yesterday. so the problem may be deeper somehow]

@rohit2sharma95
Copy link
Collaborator

But the check (added in #28046) still exists in the main branch:

if (this._config.touch && this._touchSupported) {
this._addTouchEventListeners()
}

@patrickhlauke
Copy link
Member Author

where is the actual data-touch data attribute queried? is that part of some more generic "grab anything that's a data attribute and shove it into the _config object" type logic?

@patrickhlauke
Copy link
Member Author

as I always find it difficult to debug this sort of thing easily, and also because it would be nice to actually provide a live example, i made this provisional PR here to add a carousel without touch to the docs #32638

@patrickhlauke
Copy link
Member Author

using the added example from #32638 I can confirm that https://deploy-preview-32638--twbs-bootstrap.netlify.app/docs/5.0/components/carousel/#suppressing-touch-swiping when tested on iOS, Android, and a Surface with touchscreen still reacts to touch/swipe despite the data-touch="false" attribute

@patrickhlauke
Copy link
Member Author

turns out i was being a moron - this actually works in v5 if using the correct data-bs-touch="false". now wondering how to test the reported issue in 4.5...

@patrickhlauke patrickhlauke removed the v5 label Dec 28, 2020
@patrickhlauke
Copy link
Member Author

ok, having now tested this in v4.5 as well, it seems there is no actual problem with data-touch="false". #32639

closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants