From: Adam Foster Date: Fri, 9 Jan 2015 21:53:30 +0000 (-0500) Subject: Core: Match on exact node name for `:focusable` and `:tabbable` X-Git-Tag: 1.12.0-beta.1~464 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c66842b45e032ac09f73fcd767e78390d7191b6f;p=jquery-ui.git Core: Match on exact node name for `:focusable` and `:tabbable` Fixes #10747 Ref gh-1417 --- diff --git a/ui/core.js b/ui/core.js index 28e9841dd..224d12b15 100644 --- a/ui/core.js +++ b/ui/core.js @@ -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 :