mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix #12127. IE9/10 checks fall off the box on clone. Close gh-873.
This commit is contained in:
committed by
Dave Methvin
parent
fffd23285a
commit
569d064fc9
@@ -1895,3 +1895,14 @@ test("html() - script exceptions bubble (#11743)", function() {
|
||||
ok( false, "error ignored" );
|
||||
}, "exception bubbled from remote script" );
|
||||
});
|
||||
|
||||
test("checked state is cloned with clone()", function(){
|
||||
expect(2);
|
||||
|
||||
var elem = jQuery.parseHTML('<input type="checkbox" checked="checked"/>')[0];
|
||||
elem.checked = false;
|
||||
equal( jQuery(elem).clone().attr('id','clone')[0].checked, false, 'Checked false state correctly cloned' );
|
||||
elem = jQuery.parseHTML('<input type="checkbox"/>')[0];
|
||||
elem.checked = true;
|
||||
equal( jQuery(elem).clone().attr('id','clone')[0].checked, true, 'Checked true state correctly cloned' );
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user