Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6604809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:12:23+00:00 2026-05-25T19:12:23+00:00

Let me start with the problem: Chrome behaves strange when using setTimeout() if the

  • 0

Let me start with the problem: Chrome behaves strange when using setTimeout() if the user changes browser tabs, the executing of the Javascript is halted/pauzed. After the user changes back, Chrome wants to catch up, so the animation isn’t respecting the timneout and is animating out of control.

I’m trying to prevent Chrome from rushing the animation if the user comes back after a while. I’ve found in another question that jQuery offers a .blur & .focus event, but that doens’t seem to work either:

$(window).blur(function() {
  clearTimeout(timer) 
})

Is there any way to stop the animation on the exact moment that the user changes the tabs, or is there no event that gets fired just after the user changes tabs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:12:24+00:00Added an answer on May 25, 2026 at 7:12 pm

    In most modern browsers when a tab isn’t in focus, timeout stop firing as often which is why you are seeing the animation being paused/jittering. This is intentional.

    There is a great mozilla article that explains how to write some logic that will handle the animations when the tab isn’t in focus. It even includes a small cross-browser library called animLoop.js to help you. The examples will also work in Chrome.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok here is my problem : Before i start the description, let me to
Let me start out by saying that I'm not a JavaScript developer so this
Let me start by saying that I'm not a power-JavaScript/jQuery programmer, I do very
Let me start from a real life example: Customer: Alex, just noticed something strange
I'm trying to let the user choose the browser my application uses to launch
let's start off with the problem statement: My iOS application has a login form.
Let's start by saying that my code works perfectly fine, there is no problem
Let's start from simple introduction. For better understanding my problem I have drastically simplifield
I am using ColdFusion 9.0.1. Let me start by stating that I may not
Let me start off by saying my JavaScript skills are lacking, to say the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.