Bug Tracker

Ticket #769: 769.diff

File 769.diff, 882 bytes (added by davidserduke, 5 years ago)

patch

  • src/core.js

     
    483483                                        if ( elem.nodeType == 1 ) 
    484484                                                scripts = scripts.add( jQuery( "script", elem ).remove() ); 
    485485 
     486                                        // IE6 fails to copy the checked state over on appendChild type calls 
     487                                        if ( jQuery.browser.msie && jQuery.browser.version == "6.0" ) { 
     488                                                var c = jQuery(elem).find("input").andSelf().filter(":checkbox,:radio"); 
     489                                                c.each(function () { 
     490                                                        this.saveChecked = this.checked; 
     491                                                }); 
     492                                        } 
     493 
    486494                                        // Inject the elements into the document 
    487495                                        callback.call( obj, elem ); 
     496 
     497                                        // set the checked values in IE6 (from above) 
     498                                        if ( c ) 
     499                                                c.each(function () { 
     500                                                        if (this.saveChecked) 
     501                                                                this.checked = true; 
     502                                                }); 
    488503                                } 
    489504                        }); 
    490505