diff options
-rw-r--r-- | src/attributes.js | 3 | ||||
-rw-r--r-- | test/unit/attributes.js | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js index 475f4031e..4d15e8054 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -524,7 +524,8 @@ if ( !getSetAttribute ) { fixSpecified = { name: true, - id: true + id: true, + coords: true }; // Use this for any attribute in IE6/7 diff --git a/test/unit/attributes.js b/test/unit/attributes.js index dbfa8c0c1..5d9a11139 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -1176,3 +1176,16 @@ test("contents().hasClass() returns correct values", function() { ok( $contents.hasClass("foo"), "Found 'foo' in $contents" ); ok( !$contents.hasClass("undefined"), "Did not find 'undefined' in $contents (correctly)" ); }); + +test("coords returns correct values in IE6/IE7, see #10828", function() { + expect(2); + + var map = jQuery("<map />"), + area; + + area = map.html("<area shape='rect' coords='0,0,0,0' href='#' alt='a' />").find("area"); + equal( area.attr("coords"), "0,0,0,0", "did not retrieve coords correctly"); + + area = map.html("<area shape='rect' href='#' alt='a' /></map>").find("area"); + equal( area.attr("coords"), undefined, "did not retrieve coords correctly"); +}); |