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

A fix for Ticket #9217 - jQuery crashing in IE. #542

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@geoffhuston
Copy link

commented Oct 11, 2011

This ticket describes a jquery crash in IE when an element being
animated is removed. Unfortunately, this fix uses a try/catch -
probably due to my lack of knowledge of the internals of IE.

From what I can infer, when an element is switched out from under
javascript, it is an error to write to scrollTop; the only way to
know whether it is an error to write to a field as far as I know
is to write to it: thus the try/catch.

Geoff Huston
A fix for Ticket #9217 - jQuery crashing in IE.
This ticket describes a jquery crash in IE when an element being
animated is removed. Unfortunately, this fix uses a try/catch -
probably due to my lack of knowledge of the internals of IE.

From what I can infer, when an element is switched out from under
javascript, it is an error to write to scrollTop; the only way to
know whether it is an error to write to a field is to write to it:
thus the try/catch.
@gnarf

This comment has been minimized.

Copy link
Member

commented Oct 11, 2011

I really really dislike this "catch and release" pattern here... There HAS to be a better way to fix this bug.

Timmy's suggestion in the bug ticket has some merit, to fix the crash/bug you just need to .stop() the animation before removing the element - which makes sense anyway...

Why are we still animating an element that has been removed? Should these timers be stopped? etc..

http://bugs.jquery.com/ticket/9217#comment:3

@timmywil

This comment has been minimized.

Copy link
Member

commented Oct 11, 2011

We should stop the timers before removal. Thank you for looking into it, but this pull will not be merged.

@timmywil timmywil closed this Oct 11, 2011

@geoffhuston

This comment has been minimized.

Copy link
Author

commented Oct 11, 2011

I'm with you guys - I didn't like it either. But I couldn't think of a better way to do it. Thanks for looking in to it!

@gnarf

This comment has been minimized.

Copy link
Member

commented Oct 11, 2011

@foxontherocks - Follow along at #543 - if you wouldn't mind testing this against your test case too...

@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.