Skip to main content

Bug Tracker

Side navigation

#6836 closed bug (fixed)

Opened July 27, 2010 10:51PM UTC

Closed November 02, 2010 03:24AM UTC

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

Reported by: fabiangebert Owned by: rwaldron
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.

Attachments (0)
Change History (2)

Changed October 26, 2010 01:46PM UTC by rwaldron comment:1

keywords: clone,cloneCopyEvent,prototype,array,handlingneedsreview, clone,cloneCopyEvent,prototype,array,handling
owner: → rwaldron
priority: → low
status: newassigned

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

Changed November 02, 2010 03:24AM UTC by dmethvin comment:2

keywords: needsreview, clone,cloneCopyEvent,prototype,array,handlingclone cloneCopyEvent,prototype,array,handling
resolution: → fixed
status: assignedclosed

This was fixed in 1.4.3