Fixed tabindex normalization so that elements that natively support tabbing, but don't have a tabindex explicitly set return 0 instead of undefined.

Removed jQuery.support.tabindex since we're only normalizing non-XML right now and all browsers support tabIndex for HTML documents.
This commit is contained in:
Scott González 2009-01-07 14:36:30 +00:00
parent f9e0b1ed7a
commit 49d0d5b7a3
3 changed files with 17 additions and 17 deletions

View file

@ -562,7 +562,7 @@ test("attr('tabindex')", function() {
equals(jQuery('#divWithNoTabIndex').attr('tabindex'), undefined, 'no tabindex, not tabbable by default');
// link without a tabindex
equals(jQuery('#linkWithNoTabIndex').attr('tabindex'), undefined, 'no tabindex, tabbable by default');
equals(jQuery('#linkWithNoTabIndex').attr('tabindex'), 0, 'no tabindex, tabbable by default');
});
test("attr('tabindex', value)", function() {
@ -1560,7 +1560,7 @@ test("removeClass(String) - simple", function() {
});
test("toggleClass(String)", function() {
expect(6);
expect(6);
var e = jQuery("#firstp");
ok( !e.is(".test"), "Assert class not present" );
e.toggleClass("test");
@ -1568,12 +1568,12 @@ test("toggleClass(String)", function() {
e.toggleClass("test");
ok( !e.is(".test"), "Assert class not present" );
e.toggleClass("test", false);
ok( !e.is(".test"), "Assert class not present" );
e.toggleClass("test", true);
ok( e.is(".test"), "Assert class present" );
e.toggleClass("test", false);
ok( !e.is(".test"), "Assert class not present" );
e.toggleClass("test", false);
ok( !e.is(".test"), "Assert class not present" );
e.toggleClass("test", true);
ok( e.is(".test"), "Assert class present" );
e.toggleClass("test", false);
ok( !e.is(".test"), "Assert class not present" );
});
test("removeAttr(String", function() {