From f1345e3900e4ac7e5c496b82c04731ce7535bdf7 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 (cherry picked from commit c66842b45e032ac09f73fcd767e78390d7191b6f) --- ui/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/core.js b/ui/core.js index ee01d5988..0b2e03950 100644 --- a/ui/core.js +++ b/ui/core.js @@ -97,7 +97,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