Bootstrap: Pause on the Carousel dont work in Google Chrome

Created on 7 Jan 2017  路  8Comments  路  Source: twbs/bootstrap

OS: Windows 10
Browser: Google Chrome Version 55.0.2883.87m

Problem: Pause on the Carousel dont work

The Chrome Browser on my Desktop don't stop the Slide when i hover the Mouse over the Carousel. The check of !('ontouchstart' in document.documentElement) evaluate to True and the Mouseenter and Mouseleave Event is not registered. I think another check is needed.

confirmed js v4

Most helpful comment

+1 not working with Chrome and @Johann-S your CodePen not working for me on Chrome

Workaround found at #1048 :

$('.carousel').hover(function () { 
  $(this).carousel('pause') 
}, function () { 
  $(this).carousel('cycle') 
})

All 8 comments

yes, checking for ontouchstart is bound to give false positives (or rather, it doesn't test what some authors expect) and will only get more muddy in the near future https://bugs.chromium.org/p/chromium/issues/detail?id=392584

also, this doesn't seem to take into account scenarios where there are BOTH a mouse and a touchscreen. in short, this code (and any other instances of conditionals depending on ontouchstart being present, e.g. in https://github.com/twbs/bootstrap/blob/65ffb1c3b6e94440812a2e228cb8e8be512652ec/js/src/dropdown.js#L98) will need to be rethought. /cc @mdo

For me pause (on hover) Carousel work, see this CodePen (BS 4 Alpha 6) : http://codepen.io/Johann-S/pen/oBedMZ
But we should follow what @patrickhlauke said

+1 not working with Chrome and @Johann-S your CodePen not working for me on Chrome

Workaround found at #1048 :

$('.carousel').hover(function () { 
  $(this).carousel('pause') 
}, function () { 
  $(this).carousel('cycle') 
})

I checked once again my CodePen and everything is working

This is my version of Chrome (on Desktop) : 56.0.2924.87 (64-bit)

My version is 56.0.2924.87 (64-bit) too !

I work on Windows 10 with an hybrid PC (Lenovo Yoga) connected to an external screen...

+1 noworky on Window 10, Chrome 56.0.2924.87, touchscreen Samsung ATIV. Fixed with xsalto-camille's jQuery workaround. Thanks.

so is this a touch issues or also a mouse hover issue?
i'm on a macbook pro with macos 10.12.5 and chrome 59.0.3071.115 and the mouse hover seems to work, in the inspector the touch>hold kind of hover is also working

Was this page helpful?
0 / 5 - 0 ratings

Related issues

IamManchanda picture IamManchanda  路  3Comments

ziyi2 picture ziyi2  路  3Comments

devfrey picture devfrey  路  3Comments

tiendq picture tiendq  路  3Comments

athimannil picture athimannil  路  3Comments