Ticket #9435 (closed bug: cantfix)
javascript error while reloading during animation
| Reported by: | JorisDebonnet | Owned by: | JorisDebonnet |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | effects | Version: | git |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
It's really nothing serious, but something very slightly goes wrong, so I thought I'd just report it.
When you reload a page that is currently doing an animation, you get a javascript error. Probably because jQuery is still trying to reference something for the animation that has disappeared in the meanwhile.
Since the 'reloaded' page works as it should, it's certainly not a big thing. Only that I get red messages in some addons that are tracking errors.
It may be easy to fix though, although I'm not sure whether it would cause any performance issues (if an additional check is required on every step).
The 'error' happens on current line 8400, where it merely says:
if ( timerId )
Change History
comment:1 Changed 2 years ago by rwaldron
- Owner set to JorisDebonnet
- Status changed from new to pending
- Component changed from unfiled to effects
comment:2 Changed 2 years ago by rwaldron
Is this in a particular browser? I've tested all of them after removing your setTimeout and I see no errors.
comment:3 Changed 2 years ago by JorisDebonnet
- Status changed from pending to new
Do you reload the page though?
Here's a slightly changed version where you can reload by clicking the button (but you can of course just reload the page/frame yourself):
I see the errors appear in Firebug and in Webdeveloper Toolbar, in Firefox 4.
comment:4 Changed 2 years ago by JorisDebonnet
The error is: "attempt to run compile-and-go script on a cleared scope".
comment:5 Changed 2 years ago by dmethvin
- Status changed from new to pending
I've verified this, but it looks like a bug in Firefox to me. Seems like FF must not be stopping the timer. It's beyond our abilities to control I would think. Can you report it to Mozilla?
comment:6 Changed 2 years ago by JorisDebonnet
- Status changed from pending to new
You probably have a point. I have reported it as a Firefox bug right here: https://bugzilla.mozilla.org/show_bug.cgi?id=661405
Let's see what they say :)
comment:7 Changed 2 years ago by addyosmani
- Priority changed from undecided to low
- Status changed from new to closed
- Resolution set to cantfix
As this is an issue with Firefox itself and is currently beyond the scope of our ability to fix, the ticket is being closed as cantfix. Should we however discover at a later point that there is a core patch that can be applied to fix the behaviour experienced, please feel free to re-open.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I see an illegal invocation error caused by your setTimeout trying to execute location.reload