]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Match on exact node name for `:focusable` and `:tabbable`
authorAdam Foster <slimfoster@gmail.com>
Fri, 9 Jan 2015 21:53:30 +0000 (16:53 -0500)
committerScott González <scott.gonzalez@gmail.com>
Mon, 9 Feb 2015 16:58:03 +0000 (11:58 -0500)
Fixes #10747
Ref gh-1417
(cherry picked from commit c66842b45e032ac09f73fcd767e78390d7191b6f)

ui/core.js

index ee01d5988da3c1e3df771c717332be4ea16bb380..0b2e039509c3b91fd88ed1f7ad771178b22438b0 100644 (file)
@@ -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 :