diff options
author | rwldrn <waldron.rick@gmail.com> | 2011-02-01 17:54:02 -0500 |
---|---|---|
committer | Anton M <obhvsbypqghgc@gmail.com> | 2011-02-02 00:09:51 +0100 |
commit | fa4c90987fc9aede4de3f41976cda91acad81736 (patch) | |
tree | 98676824479991d40477544be74ff6688e8ebd5e /test/unit | |
parent | cb85da7b62e74e7339ed652ade209aaffbd0c15b (diff) | |
download | jquery-fa4c90987fc9aede4de3f41976cda91acad81736.tar.gz jquery-fa4c90987fc9aede4de3f41976cda91acad81736.zip |
Fixes #8129. Fix cloning multiple selected options in IE8.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/manipulation.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index e07108696..1313783e0 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -1006,7 +1006,7 @@ test("clone()", function() { test("clone(form element) (Bug #3879, #6655)", function() { expect(6); - element = jQuery("<select><option>Foo</option><option selected>Bar</option></select>"); + var element = jQuery("<select><option>Foo</option><option selected>Bar</option></select>"); equals( element.clone().find("option:selected").val(), element.find("option:selected").val(), "Selected option cloned correctly" ); @@ -1026,6 +1026,14 @@ test("clone(form element) (Bug #3879, #6655)", function() { equals( clone[0].defaultValue, "foo", "Textarea defaultValue cloned correctly" ); }); +test("clone(multiple selected options) (Bug #8129)", function() { + expect(1); + var element = jQuery("<select><option>Foo</option><option selected>Bar</option><option selected>Baz</option></select>"); + + equals( element.clone().find("option:selected").length, element.find("option:selected").length, "Multiple selected options cloned correctly" ); + +}); + if (!isLocal) { test("clone() on XML nodes", function() { expect(2); |