Skip to main content

Bug Tracker

Side navigation

#3202 closed bug (duplicate)

Opened July 30, 2008 03:00PM UTC

Closed August 12, 2008 07:41PM UTC

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 July 30, 2008 03:02PM UTC.

    example of incorect return of "makeArray"

Change History (3)

Changed July 30, 2008 10:48PM UTC by flesler comment:1

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.

Changed August 12, 2008 07:40PM UTC by flesler comment:2

resolution: wontfix
status: closedreopened

Changed August 12, 2008 07:41PM UTC by flesler comment:3

cc: → dzenkovich
resolution: → duplicate
status: reopenedclosed

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