Bug Tracker

Modify

Ticket #3202 (closed bug: duplicate)

Opened 5 years ago

Last modified 5 years ago

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
Blocking: Blocked by:

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

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

Change History

Changed 5 years ago by dzenkovich

example of incorect return of "makeArray"

comment:1 Changed 5 years ago by flesler

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

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 5 years ago by flesler

  • Status changed from closed to reopened
  • Resolution wontfix deleted

comment:3 Changed 5 years ago by flesler

  • Cc dzenkovich added
  • Status changed from reopened to closed
  • Resolution set to duplicate

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

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.