Skip to main content

Bug Tracker

Side navigation

Ticket #921: jquery.diff


File jquery.diff, 0.7 KB (added by brandon, April 04, 2007 02:44AM UTC)

Patch

Index: src/jquery/jquery.js
===================================================================
--- src/jquery/jquery.js	(revision 1620)
+++ src/jquery/jquery.js	(working copy)
@@ -840,8 +840,10 @@
 	 */
 	clone: function(deep) {
 		return this.pushStack( jQuery.map( this, function(a){
-			var a = a.cloneNode( deep != undefined ? deep : true );
-			a.$events = null; // drop $events expando to avoid firing incorrect events
+			a = a.cloneNode( deep != undefined ? deep : true );
+			// drop $events expando to avoid firing incorrect events in IE
+			a.$events = null; 
+			jQuery(a).children().each(function(){ this.$events = null; });
 			return a;
 		}) );
 	},

Download in other formats:

Original Format