diff options
author | Colin Snover <github.com@zetafleet.com> | 2010-12-19 15:33:53 -0600 |
---|---|---|
committer | Colin Snover <github.com@zetafleet.com> | 2010-12-19 15:33:53 -0600 |
commit | faefbb1ad0b81e8001b582d06d5bd9c9236e62ce (patch) | |
tree | 608ced365e940684a0a2572d365ff97ad50a7863 /src/manipulation.js | |
parent | 291b1edf444f30d9360a42c8d563e26eaf1a2ddb (diff) | |
download | jquery-faefbb1ad0b81e8001b582d06d5bd9c9236e62ce.tar.gz jquery-faefbb1ad0b81e8001b582d06d5bd9c9236e62ce.zip |
Fix #7717 and #7165. Thanks to dmethvin and iliakan for their help fixing these issues.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 7dea3493c..c23f62ed1 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -373,12 +373,12 @@ function cloneCopyEvent(orig, ret) { var i = 0; ret.each(function() { - if ( this.nodeType !== 1 || this.nodeName !== (orig[i] && orig[i].nodeName) ) { + if ( this.nodeType !== 1 || this.nodeName !== (orig[i] && orig[i].nodeName) || !jQuery.hasData(orig[i]) ) { return; } var oldData = jQuery.data( orig[i++] ), - curData = jQuery.data( this, oldData ), + curData = jQuery.data( this, jQuery.extend(true, {}, oldData) ), events = oldData && oldData.events; if ( events ) { |