Bug Tracker

Opened 13 years ago

Closed 13 years ago

#6836 closed bug (fixed)

Array incorrectly dealt as object breaking functionality of clone function when using custom Array prototype

Reported by: fabiangebert Owned by: Rick Waldron
Priority: low Milestone: 1.4.3
Component: event Version: 1.4.2
Keywords: clone cloneCopyEvent, prototype, array, handling Cc:
Blocked by: Blocking:

Description

In line 4344 of the released 1.4.2 instead of

for ( var handler in events[ type ] ) {

it must be

for ( var handler=0;handler<events[type].length;handler++) {

since events[type] is an array. In case you've extended the Array prototype with functions or objects, the wrong code will break functionality when using ,clone()-method.

Change History (2)

comment:1 Changed 13 years ago by Rick Waldron

Keywords: needsreview added
Owner: set to Rick Waldron
Priority: low
Status: newassigned

jQuery is not responsible for changes to native objects - but I'm going to open this for review.

comment:2 Changed 13 years ago by dmethvin

Keywords: needsreview removed
Resolution: fixed
Status: assignedclosed

This was fixed in 1.4.3

Note: See TracTickets for help on using tickets.