Fix #7717 and #7165. Thanks to dmethvin and iliakan for their help fixing these issues.

This commit is contained in:
Colin Snover 2010-12-19 15:33:53 -06:00
parent 291b1edf44
commit faefbb1ad0
3 changed files with 30 additions and 10 deletions

View file

@ -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 ) {