Skip to content

Loading…

fixes #10828, ATTR("COORDS") RETURNS UNDEFINED IN IE7 #695

Closed
wants to merge 1 commit into from

3 participants

@mikesherov
jQuery Foundation member

Not much to see here.

Might as well change the author info to @timmywil. I just finished it up, but all the research was there for me. I figured I might as well submit a PR just to wrap up some bugs before 1.7.2 is finalized.

@mikesherov
jQuery Foundation member

Might as well change the author info to timmywil. I just finished it up, but all the research was there for me. I figured I might as well submit a PR just to wrap up some bugs before 1.7.2 is finalized.

@timmywil
jQuery Foundation member

Thanks for doing the work here.

@dmethvin
jQuery Foundation member

LANDED.toLowerCase() da02e19

@dmethvin dmethvin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 25, 2012
  1. @mikesherov
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 1 deletion.
  1. +2 −1 src/attributes.js
  2. +13 −0 test/unit/attributes.js
View
3 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
View
13 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");
+});
Something went wrong with that request. Please try again.