Bug Tracker

Modify

Ticket #12309 (closed bug: invalid)

Opened 9 months ago

Last modified 9 months ago

array.splice in ie7 and ie8

Reported by: kelly.pangburn@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocking: Blocked by:

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

comment:1 Changed 9 months ago by timmywil

  • Status changed from new to closed
  • Resolution set to invalid

jquery does not have any effect on native prototypes. Please ask for help on the  forums or in the #jquery irc channel.

Last edited 9 months ago by timmywil (previous) (diff)

comment:2 Changed 9 months ago by petr@…

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 9 months ago by dmethvin

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 9 months ago by petr@…

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 9 months ago by timmywil

Actually, $.unique was not changed in 1.8. Also, $.fn.add does unique internally so the code is redundant.

comment:6 Changed 9 months ago by timmywil

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 9 months ago by petr@…

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...

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.