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

Odd behavior with Carousel when Win Chrome browser tab is inactive #15298

Closed
skibulk opened this Issue Dec 4, 2014 · 16 comments

Comments

Projects
None yet
5 participants
@skibulk

skibulk commented Dec 4, 2014

I'm using the built in JS carousel a rotating header on my site. The problem occurs while using tabs in the latest version of Chrome.

First open a page with a carousel on it. Then open a new tab (same window). After a few slides would have gone by, switch back to the carousel. The current slide/next slide transition should be broken for one iteration. For example, the current slide image isn't shown until the next slide takes its place. Also the transition times seem to be off. After the one broken iteration, the carousel works as normal.

Maybe this is something that Chrome is doing to save CPU?

@cvrebert

This comment has been minimized.

Member

cvrebert commented Dec 4, 2014

What OS are you using?

@cvrebert cvrebert changed the title from Carousel window.focus odd behavior. to Odd behavior with Carousel when browser tab is inactive Dec 4, 2014

@skibulk

This comment has been minimized.

skibulk commented Dec 4, 2014

Win 7 x64

@cvrebert cvrebert added the js label Jan 5, 2015

@cvrebert

This comment has been minimized.

Member

cvrebert commented Jan 5, 2015

Just for the record, I can't seem to repro on Mac Chrome.

@cvrebert cvrebert changed the title from Odd behavior with Carousel when browser tab is inactive to Odd behavior with Carousel when Win Chrome browser tab is inactive Jan 5, 2015

@cvrebert

This comment has been minimized.

Member

cvrebert commented Jan 5, 2015

@XhmikosR Could you try to repro this?

@XhmikosR

This comment has been minimized.

Member

XhmikosR commented Jan 6, 2015

I can't seem to reproduce either on the /components page.

@cvrebert

This comment has been minimized.

Member

cvrebert commented Jan 6, 2015

@juthilo @hnrch02 Mind giving this a try on Windows?

@juthilo

This comment has been minimized.

Member

juthilo commented Jan 6, 2015

I should be able to check this out later today, sure

@dhampik

This comment has been minimized.

dhampik commented Jan 8, 2015

Can reproduce it on http://getbootstrap.com/javascript/#carousel
Ubuntu 14.10 x64 Google Chrome 39.0.2171.95 (64-bit)

@cvrebert

This comment has been minimized.

Member

cvrebert commented Jan 8, 2015

@juthilo Any luck?

@juthilo

This comment has been minimized.

Member

juthilo commented Jan 8, 2015

Sorry for the delay. I can reproduce on Windows 8.1 using Chrome 39.2171.95.

@cvrebert

This comment has been minimized.

Member

cvrebert commented Jan 14, 2015

@juthilo Could you file a Chromium bug?

Only workaround I can think of would be to make use of the Page Visibility API to stop the carousel when the tab isn't visible and hope that that would avoid/minimize the problem.

@cvrebert

This comment has been minimized.

Member

cvrebert commented Jan 14, 2015

Made a POC for using the visibility API. @juthilo Does the bug repro on http://jsbin.com/yigazi/3 ? (Fingers-crossed that it doesn't..)

@juthilo

This comment has been minimized.

Member

juthilo commented Jan 14, 2015

@cvrebert 👍 Can't reproduce using your JS Bin. I did a direct comparison of the live docs and your Bin to be sure.

I'll file the Chromium bug later today.

@cvrebert

This comment has been minimized.

Member

cvrebert commented Jan 14, 2015

Cool! Thanks 😄

cvrebert added a commit that referenced this issue Jan 14, 2015

Don't cycle carousel when page isn't visible
Improves performance when the page is in a hidden tab or minimized window, etc.
Fixes #15298 as this happens to work around it by preventing the problematic situation from occurring.
@juthilo

This comment has been minimized.

Member

juthilo commented Jan 15, 2015

cvrebert added a commit that referenced this issue Jan 15, 2015

cvrebert added a commit that referenced this issue Jan 15, 2015

@cvrebert cvrebert added this to the v3.3.3 milestone Jan 16, 2015

@cvrebert cvrebert removed this from the v3.3.4 milestone Feb 17, 2015

@cvrebert

This comment has been minimized.

Member

cvrebert commented Feb 17, 2015

Closing as a bug in the browser itself that we can't directly address.
#15566 would have offered an indirect workaround, but has been punted to Bootstrap v4.

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