diff options
author | Daniel Chatfield <chatfielddaniel@googlemail.com> | 2012-07-25 09:32:33 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-07-25 09:32:33 -0400 |
commit | 569d064fc93459695cb6eb6fd09e5ba3fda62f03 (patch) | |
tree | 50958d840e6175f6897edb650eaf43d85f6ecd4b /test | |
parent | fffd23285adfc31e994c0c83503eb283eab75bbd (diff) | |
download | jquery-569d064fc93459695cb6eb6fd09e5ba3fda62f03.tar.gz jquery-569d064fc93459695cb6eb6fd09e5ba3fda62f03.zip |
Fix #12127. IE9/10 checks fall off the box on clone. Close gh-873.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/manipulation.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 31426e739..e2b00a662 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -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' ); +}); |