Ticket #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 |
| 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:
| array.split | array.setInterval | array.call ) |
| 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:
| array.split | array.setInterval | ( array.call && array.call.toString().search(/\[native code\]/)>0 ) ) |
Attachments
Change History
Changed 5 years ago by dzenkovich
-
attachment
JQmakeArrayProblem.gif
added
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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

example of incorect return of "makeArray"