Bug Tracker

Opened 11 years ago

Closed 11 years ago

#3202 closed bug (duplicate)

makeArray method introduces conflict with extended array objects

Reported by: dzenkovich Owned by:
Priority: critical Milestone: 1.3
Component: core Version: 1.2.6
Keywords: makeArray prototype.js conflict Cc: dzenkovich
Blocked by: Blocking:

Description

When dom element is already extended by 3rd party lib .makeArray fail to determine that this is actually an array, just extended with methods. In my situation this was the added "call" method, probably prototype is responsible for that. Problem is in here:

if( i == null
array.split array.setInterval array.call )
The "
array.call " part in my case.

I've stumbled on situation when jQuery stopped working - it was unable to use .find gathered elements.

I've added this clumsy update to make it working:

if( i == null
array.split array.setInterval ( array.call && array.call.toString().search(/\[native code\]/)>0 ) )

Attachments (1)

JQmakeArrayProblem.gif (48.6 KB) - added by dzenkovich 11 years ago.
example of incorect return of "makeArray"

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by dzenkovich

Attachment: JQmakeArrayProblem.gif added

example of incorect return of "makeArray"

comment:1 Changed 11 years ago by flesler

Resolution: wontfix
Status: newclosed

You don't clearly state it, but you're probably using Scriptaculous. This framework did add Array.prototype.call and caused problems (1.7.x) but then changed that on 1.8.x.

As this problem is actually caused by Scriptaculous and not by jQuery, AND updating Scriptaculous fixes it, this issue won't be patched.

comment:2 Changed 11 years ago by flesler

Resolution: wontfix
Status: closedreopened

comment:3 Changed 11 years ago by flesler

Cc: dzenkovich added
Resolution: duplicate
Status: reopenedclosed

This has been taken into account in the end. Fixed at [5825].

Note: See TracTickets for help on using tickets.