1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-19 03:41:19 +02:00

Set touch-action to "none"

Firefox currently seems extremely fickle - with `pan-y` if fires pointercancel as soon as a touch strays even a pixel or so vertically.
While `touch-action: pan-y` would be ideal (allowing users to scroll the page even when their finger started the scroll on the carousel), this prevents a swipe that isn't perfectly/only horizontal to be recognised by Firefox.
This commit is contained in:
patrickhlauke
2018-10-15 23:25:44 +01:00
committed by XhmikosR
parent 9164f77269
commit 8883ccb205
2 changed files with 9 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ $(function () {
var stylesCarousel = [
'<style>',
' .carousel.pointer-event { -ms-touch-action: pan-y pinch-zoom; touch-action: pan-y pinch-zoom; }',
' .carousel.pointer-event { -ms-touch-action: none; touch-action: none; }',
'</style>'
].join('')