Fixed a bug in clone where it wouldn't work on an XML node in IE. Also added unit test for it.
This commit is contained in:
parent
c6a44c7943
commit
279f77e960
2 changed files with 12 additions and 2 deletions
|
@ -290,7 +290,7 @@ jQuery.fn = jQuery.prototype = {
|
|||
clone: function( events ) {
|
||||
// Do the clone
|
||||
var ret = this.map(function(){
|
||||
if ( jQuery.browser.msie ) {
|
||||
if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) {
|
||||
// IE copies events bound via attachEvent when
|
||||
// using cloneNode. Calling detachEvent on the
|
||||
// clone will also remove the events from the orignal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue