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

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

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

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

skibulk opened this issue Dec 4, 2014 · 16 comments

Comments

@skibulk
Copy link

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
Copy link
Collaborator

cvrebert commented Dec 4, 2014

What OS are you using?

@cvrebert cvrebert changed the title Carousel window.focus odd behavior. Odd behavior with Carousel when browser tab is inactive Dec 4, 2014
@skibulk
Copy link
Author

skibulk commented Dec 4, 2014

Win 7 x64

@cvrebert cvrebert added the js label Jan 5, 2015
@cvrebert
Copy link
Collaborator

cvrebert commented Jan 5, 2015

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

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

cvrebert commented Jan 5, 2015

@XhmikosR Could you try to repro this?

@XhmikosR
Copy link
Member

XhmikosR commented Jan 6, 2015

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

@cvrebert
Copy link
Collaborator

cvrebert commented Jan 6, 2015

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

@juthilo
Copy link
Collaborator

juthilo commented Jan 6, 2015

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

@dhampik
Copy link

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
Copy link
Collaborator

cvrebert commented Jan 8, 2015

@juthilo Any luck?

@juthilo
Copy link
Collaborator

juthilo commented Jan 8, 2015

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

@cvrebert
Copy link
Collaborator

@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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Cool! Thanks 😄

cvrebert added a commit that referenced this issue Jan 14, 2015
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
Copy link
Collaborator

juthilo commented Jan 15, 2015

Et voilà, the Chromium issue: https://code.google.com/p/chromium/issues/detail?id=449180

cvrebert added a commit that referenced this issue Jan 15, 2015
cvrebert added a commit that referenced this issue Jan 15, 2015
Add Wall of Browser Bugs entry for #15298
@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
Copy link
Collaborator

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
Projects
None yet
Development

No branches or pull requests

5 participants