🌐 AI搜索 & 代理 主页
Skip to content

"Too much recursion" with jQuery 3, Firefox, and animate's complete callback. #3434

@Pancakeo

Description

@Pancakeo

Versions:

  • Firefox 50 (latest)
  • jQuery 3.1.1

Thing: I have a loading bar that animates from left-to-right, then resets. Note that it uses the complete callback (from animate) to fire itself again.

Repro:

  1. Load http://jsbin.com/woperab/8/edit?html,css,js,output in Firefox
  2. Run, in Firefox.
  3. Minimize Firefox window.
  4. Wait about 2 minutes (get a cup of coffee).
  5. Come back.
  6. Drink coffee.
  7. Square has stopped moving. Console shows: "Too much recursion".

Note that it works if I wrap the "reset" call in a setTimeout, as in:

complete: function() { setTimeout(reset, 0) }

Speculation: Probably something to do with the requestAnimationFrame changes in jQuery 3? (If you leave the window focused, the recursion error does not appear).

Does NOT happen in Chrome/IE. Also, doesn't happen with jQuery 2.1.3.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions