aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/core/selector.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-09-25 10:33:58 -0400
committerScott González <scott.gonzalez@gmail.com>2015-09-29 12:48:11 -0400
commitd3025968f349c37a8ca41bfc63ee1b37d9d7354f (patch)
treeca9e9bfe5d96f783df37d6cd918898245bab1cce /tests/unit/core/selector.js
parent0bfbd21d4fefa98d165b7d50277bd23be84e919a (diff)
downloadjquery-ui-d3025968f349c37a8ca41bfc63ee1b37d9d7354f.tar.gz
jquery-ui-d3025968f349c37a8ca41bfc63ee1b37d9d7354f.zip
Focusable: Fix handling of `visibility: inherit`
Ref #14596 Ref gh-1583 Closes gh-1605
Diffstat (limited to 'tests/unit/core/selector.js')
-rw-r--r--tests/unit/core/selector.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/unit/core/selector.js b/tests/unit/core/selector.js
index ffae7e024..52d1902ff 100644
--- a/tests/unit/core/selector.js
+++ b/tests/unit/core/selector.js
@@ -88,7 +88,7 @@ test( "data", function() {
} );
test( "focusable - visible, enabled elements", function() {
- expect( 18 );
+ expect( 20 );
isNotFocusable( "#formNoTabindex", "form" );
isFocusable( "#formTabindex", "form with tabindex" );
@@ -108,6 +108,10 @@ test( "focusable - visible, enabled elements", function() {
isNotFocusable( "#visibleAncestor-div", "div" );
isFocusable( "#visibleAncestor-spanWithTabindex", "span with tabindex" );
isFocusable( "#visibleAncestor-divWithNegativeTabindex", "div with tabindex" );
+ isFocusable( "#nestedVisibilityInheritWithVisibleAncestor",
+ "span, visibility: inherit inside visibility: visible parent" );
+ isFocusable( "#nestedVisibilityInheritWithVisibleAncestor-input",
+ "input, visibility: inherit inside visibility: visible parent" );
} );
test( "focusable - disabled elements", function() {
@@ -125,7 +129,7 @@ test( "focusable - disabled elements", function() {
} );
test( "focusable - hidden styles", function() {
- expect( 10 );
+ expect( 12 );
isNotFocusable( "#displayNoneAncestor-input", "input, display: none parent" );
isNotFocusable( "#displayNoneAncestor-span", "span with tabindex, display: none parent" );
@@ -136,6 +140,9 @@ test( "focusable - hidden styles", function() {
isFocusable( "#nestedVisibilityOverrideAncestor-input", "input, visibility: visible parent but visibility: hidden grandparent" );
isFocusable( "#nestedVisibilityOverrideAncestor-span", "span with tabindex, visibility: visible parent but visibility: hidden grandparent " );
+ isNotFocusable( "#nestedVisibilityInheritWithHiddenAncestor", "span, visibility: inherit inside visibility: hidden parent" );
+ isNotFocusable( "#nestedVisibilityInheritWithHiddenAncestor-input", "input, visibility: inherit inside visibility: hidden parent" );
+
isNotFocusable( "#displayNone-input", "input, display: none" );
isNotFocusable( "#visibilityHidden-input", "input, visibility: hidden" );