Side navigation
#6355 closed bug (fixed)
Opened March 25, 2010 08:43PM UTC
Closed December 30, 2010 04:51AM UTC
Last modified March 14, 2012 01:03AM UTC
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: | ||
| Blocked by: | Blocking: | 
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
Attachments (0)
Change History (14)
Changed June 08, 2010 08:40PM UTC by comment:1
Changed June 08, 2010 09:13PM UTC by comment:2
+1
Changed September 27, 2010 12:13AM UTC by comment:3
| need: | Review → Commit | 
|---|---|
| priority: | → undecided | 
Changed October 21, 2010 05:48PM UTC by comment:4
| status: | new → open | 
|---|
Changed November 03, 2010 02:03AM UTC by comment:5
| version: | 1.4.2 → 1.4.3 | 
|---|
I thought this got committed for 1.4.3 but it didn't...
Changed November 03, 2010 02:03AM UTC by comment:6
| milestone: | 1.4.3 → 1.4.4 | 
|---|
Changed November 04, 2010 05:10AM UTC by comment:7
| milestone: | 1.4.4 → 1.4.5 | 
|---|
Changed December 03, 2010 10:00PM UTC by comment:8
Seeing as this has already got a quality patch with an adequate test, it should be easy enough to integrate?
Changed December 21, 2010 03:39AM UTC by comment:10
| _comment0: | Pull: https://github.com/jquery/jquery/pull/140 → 1292944008652962 | 
|---|
Changed December 30, 2010 02:56AM UTC by comment:11
| owner: | → dmethvin | 
|---|---|
| status: | open → assigned | 
Changed December 30, 2010 04:51AM UTC by comment:12
| resolution: | → fixed | 
|---|---|
| status: | assigned → closed | 
Fixed by [82ac384b494258e17e2856ee2259475ecb0174ca]
Changed January 14, 2011 10:20PM UTC by comment:13
| milestone: | 1.4.5 → 1.5 | 
|---|
Move fixed tickets to appropriate milestone
Changed January 31, 2011 04:26PM UTC by comment:14
| priority: | undecided → high | 
|---|
+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.