From 86a958d3aa04a5928484d16b27a4d3eea39142e4 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 23 Oct 2012 15:12:54 -0400 Subject: Core: Update :focsable and :tabbable to handle parents with no height/width, but visible overflow. Fixes #8643 - :focusable pseudo-selector does not find elements if parent has 0x0 dimension. --- ui/jquery.ui.core.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index e569eea42..2e9d53ae3 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -198,10 +198,10 @@ function focusable( element, isTabIndexNotNaN ) { } function visible( element ) { - return !$( element ).parents().andSelf().filter(function() { - return $.css( this, "visibility" ) === "hidden" || - $.expr.filters.hidden( this ); - }).length; + return $.expr.filters.visible( element ) && + !$( element ).parents().andSelf().filter(function() { + return $.css( this, "visibility" ) === "hidden"; + }).length; } $.extend( $.expr[ ":" ], { -- cgit v1.2.3