Core: Match on exact node name for :focusable and :tabbable

Fixes #10747
Ref gh-1417
This commit is contained in:
Adam Foster
2015-01-09 16:53:30 -05:00
committed by Scott González
parent 4de983c6d5
commit c66842b45e

View File

@@ -103,7 +103,7 @@ function focusable( element, isTabIndexNotNaN ) {
img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
return !!img && visible( img );
}
return ( /input|select|textarea|button|object/.test( nodeName ) ?
return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
!element.disabled :
"a" === nodeName ?
element.href || isTabIndexNotNaN :