Clone fragments in domManip using jQuery.clone instead of DocumentFragment.cloneNode in order to carry over event data. Fixes #5566, #6997.

This commit is contained in:
Colin Snover 2010-12-06 19:37:16 -06:00
parent c8be9461ee
commit e4900df838
2 changed files with 77 additions and 57 deletions

View file

@ -349,7 +349,7 @@ jQuery.fn.extend({
root(this[i], first) :
this[i],
i > 0 || results.cacheable || this.length > 1 ?
fragment.cloneNode(true) :
jQuery(fragment).clone(true)[0] :
fragment
);
}