From c66842b45e032ac09f73fcd767e78390d7191b6f Mon Sep 17 00:00:00 2001 From: Adam Foster Date: Fri, 9 Jan 2015 16:53:30 -0500 Subject: [PATCH] Core: Match on exact node name for `:focusable` and `:tabbable` Fixes #10747 Ref gh-1417 --- ui/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 : -- 2.39.5