Landing a fix for non-link anchor tabIndex (from scott.gonzalez). Fixes ticket #3916.

This commit is contained in:
John Resig 2009-01-19 21:40:23 +00:00
parent d6e541426d
commit 96152559e0
3 changed files with 21 additions and 17 deletions

View file

@ -986,9 +986,11 @@ jQuery.extend({
var attributeNode = elem.getAttributeNode( "tabIndex" );
return attributeNode && attributeNode.specified
? attributeNode.value
: elem.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)
: elem.nodeName.match(/(button|input|object|select|textarea)/i)
? 0
: undefined;
: elem.nodeName.match(/^(a|area)$/i) && elem.href
? 0
: undefined;
}
return elem[ name ];