#12309 closed bug (invalid)
array.splice in ie7 and ie8
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
array.splice will sit and hang on ie7 and ie8 using the new jquery library 1.8.0.
To reproduce, use jquery 1.8.0 and jquery.reel.js plugin (v1.2) and run it in ie7 or 8. It sits and hangs on the ssplice function.
Change History (7)
comment:1 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
It hangs on $.unique()
when used like this $.unique($(document).add(window.top.document))
(it should get either iframe and its parent frame (when in iframe) or get just document when the current window is the top one). To be precise, it hangs that much, that IE8 displays "kill or wait" dialog, but if you wait, it will eventually complete. It worked just fine in 1.7.2 and below, but fails with 1.8.
comment:3 Changed 10 years ago by
This function only works on plain JavaScript arrays of DOM elements, and is chiefly used internally by jQuery. -- http://api.jquery.com/jQuery.unique/
1) You are passing it a jQuery object.
2) You are adding a document
element.
Two things wrong with that so far, so I'll call this one invalid.
comment:4 Changed 10 years ago by
Ah, did not know that. I suspected this wasn't entirely right, but hey, it worked ;) Thanks for the explanation, dmethvin! It indeed is invalid for jQuery. Workaround for Reel is underway. Kelly, please follow me to https://github.com/pisi/Reel/issues/140
comment:5 Changed 10 years ago by
Actually, $.unique was not changed in 1.8. Also, $.fn.add does unique internally so the code is redundant.
comment:6 Changed 10 years ago by
Sorry, add won't call unique since documents don't have parentNodes and are treated as disconnected. Still, unique received no revisions in 1.8.
comment:7 Changed 10 years ago by
Actually, I am not arguing with you that $.unique()
was changed at all. No way ;) I am just saying, that if you run the above code in jQuery 1.5, 1.6 or 1.7, it would work very fine very fast in IE8 and it will hang with jQuery 1.8. Then, the outcome is the very same. Just tooks way more time to perform...
jquery does not have any effect on native prototypes. Please ask for help on the forums or in the #jquery irc channel.