Bug Tracker

Ticket #6355 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

clone(true) creates bogus event bindings if you extend Array.prototype

Reported by: airportyh Owned by: dmethvin
Priority: high Milestone: 1.5
Component: manipulation Version: 1.4.3
Keywords: Cc:
Blocking: Blocked by:

Description

If you added extra methods to Array.prototype and use jQuery.clone(true) to clone an element which has bound events, it will create bogus event bindings: one for each extra method you added to Array.prototype. The test added to test/unit/manipulation.js demonstrates this.

The patch that fixes this is at:  http://github.com/airportyh/jquery/commit/5e1bc7a973ae28f19f37759662ab0ea33076125c#comment_58550

Change History

comment:1 Changed 4 years ago by arkitrave

+1. Just discovered this bug today on a site we're upgrading to 1.4.2. This did not happen under 1.3.2. It's in the cloneCopyEvent method, and affects IE.

comment:2 Changed 4 years ago by pbcomm

+1

comment:3 Changed 4 years ago by dmethvin

  • need changed from Review to Commit
  • Priority set to undecided

comment:4 Changed 4 years ago by SlexAxton

  • Status changed from new to open

comment:5 Changed 4 years ago by dmethvin

  • Version changed from 1.4.2 to 1.4.3

I thought this got committed for 1.4.3 but it didn't...

comment:6 Changed 4 years ago by dmethvin

  • Milestone changed from 1.4.3 to 1.4.4

comment:7 Changed 4 years ago by john

  • Milestone changed from 1.4.4 to 1.4.5

comment:8 Changed 4 years ago by mrgnrdrck

Seeing as this has already got a quality patch with an adequate test, it should be easy enough to integrate?

comment:9 Changed 4 years ago by dmethvin

#7809 is a duplicate of this ticket.

comment:10 Changed 4 years ago by dmethvin

Last edited 4 years ago by dmethvin (previous) (diff)

comment:11 Changed 4 years ago by dmethvin

  • Owner set to dmethvin
  • Status changed from open to assigned

comment:12 Changed 4 years ago by snover

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:13 Changed 4 years ago by jitter

  • Milestone changed from 1.4.5 to 1.5

Move fixed tickets to appropriate milestone

comment:14 Changed 4 years ago by john

  • Priority changed from undecided to high
Note: See TracTickets for help on using tickets.