]> 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>
Fri, 9 Jan 2015 21:56:20 +0000 (16:56 -0500)
Fixes #10747
Ref gh-1417

ui/core.js

index 28e9841dd8ac6c436e7dcb1b642b4d1620272f0f..224d12b15641bbe6aa4224eb451c07707d429765 100644 (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 :