github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 823
    • 184
  • Source
  • Commits
  • Network (184)
  • Graphs
  • Tree: 3f070bd

click here to add a description

click here to add a homepage

  • Switch Branches (8)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
    • widget-super
  • Switch Tags (19)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.2
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Core: Fixed :focusable and :tabbable selectors for to work with :hidden and 
:visibile selectors in jQuery 1.3.2+. Still need to handle areas properly. 
Partial fix for #4488 - :focusable and :tabbable are broken with jQuery 1.3.2.
scottgonzalez (author)
Wed Jul 21 19:10:16 -0700 2010
commit  3f070bdc62a8d00ca6d8
tree    93469406fe74f754010e
parent  4c55071976168db5d002
M tests/unit/core/core.html 26 ••••
M tests/unit/core/selector.js 4 ••••
M ui/jquery.ui.core.js 5 •••••
Txt tests/unit/core/core.html
  • View file @ 3f070bd
... ...
@@ -82,19 +82,19 @@
82 82
   <div>
83 83
     <div id="displayNoneAncestor" style="display: none;">
84 84
       <input id="displayNoneAncestor-input" />
85  
-      <span tabindex="1" id="displayNoneAncestor-span"></span>
  85
+      <span tabindex="1" id="displayNoneAncestor-span">.</span>
86 86
     </div>
87 87
     
88 88
     <div id="visibilityHiddenAncestor" style="visibility: hidden;">
89 89
       <input id="visibilityHiddenAncestor-input" />
90  
-      <span tabindex="1" id="visibilityHiddenAncestor-span"></span>
  90
+      <span tabindex="1" id="visibilityHiddenAncestor-span">.</span>
91 91
     </div>
92 92
     
93 93
     <input id="displayNone-input" style="display: none;" />
94 94
     <input id="visibilityHidden-input" style="visibility: hidden;" />
95 95
     
96  
-    <span tabindex="1" id="displayNone-span" style="display: none;"></span>
97  
-    <span tabindex="1" id="visibilityHidden-span" style="visibility: hidden;"></span>
  96
+    <span tabindex="1" id="displayNone-span" style="display: none;">.</span>
  97
+    <span tabindex="1" id="visibilityHidden-span" style="visibility: hidden;">.</span>
98 98
   </div>
99 99
   
100 100
   <div>
... ...
@@ -103,28 +103,28 @@
103 103
     <input id="inputTabindex-1" tabindex="-1" />
104 104
     <input id="inputTabindex-50" tabindex="-50" />
105 105
     
106  
-    <span id="spanTabindex0" tabindex="0"></span>
107  
-    <span id="spanTabindex10" tabindex="10"></span>
108  
-    <span id="spanTabindex-1" tabindex="-1"></span>
109  
-    <span id="spanTabindex-50" tabindex="-50"></span>
  106
+    <span id="spanTabindex0" tabindex="0">.</span>
  107
+    <span id="spanTabindex10" tabindex="10">.</span>
  108
+    <span id="spanTabindex-1" tabindex="-1">.</span>
  109
+    <span id="spanTabindex-50" tabindex="-50">.</span>
110 110
   </div>
111 111
   
112 112
   <div>
113 113
     <input id="inputTabindexfoo" tabindex="foo" />
114 114
     <input id="inputTabindex3foo" tabindex="3foo" />
115 115
     
116  
-    <span id="spanTabindexfoo" tabindex="foo"></span>
117  
-    <span id="spanTabindex3foo" tabindex="3foo"></span>
  116
+    <span id="spanTabindexfoo" tabindex="foo">.</span>
  117
+    <span id="spanTabindex3foo" tabindex="3foo">.</span>
118 118
   </div>
119 119
   
120 120
   <div id="zIndex100" style="z-index: 100; position: absolute">
121  
-    <div id="zIndexAutoWithParent"></div>
  121
+    <div id="zIndexAutoWithParent">.</div>
122 122
   </div>
123 123
   <div id="zIndex100ViaCSS" class="zindex">
124  
-    <div id="zIndexAutoWithParentViaCSS"></div>
  124
+    <div id="zIndexAutoWithParentViaCSS">.</div>
125 125
   </div>
126 126
   <div id="zIndex100ViaCSSPositioned" class="zindex absolute">
127  
-    <div id="zIndexAutoWithParentViaCSSPositioned"></div>
  127
+    <div id="zIndexAutoWithParentViaCSSPositioned">.</div>
128 128
   </div>
129 129
   <div id="zIndexAutoNoParent"></div>
130 130
 </div>
Txt tests/unit/core/selector.js
  • View file @ 3f070bd
... ...
@@ -132,7 +132,7 @@ test("focusable - hidden styles", function() {
132 132
   isNotFocusable('#visibilityHidden-span', 'span with tabindex, visibility: hidden');
133 133
 });
134 134
 
135  
-test("focusable -  natively focusable with various tabindex", function() {
  135
+test("focusable - natively focusable with various tabindex", function() {
136 136
   expect(4);
137 137
   
138 138
   isFocusable('#inputTabindex0', 'input, tabindex 0');
... ...
@@ -141,7 +141,7 @@ test("focusable -  natively focusable with various tabindex", function() {
141 141
   isFocusable('#inputTabindex-50', 'input, tabindex -50');
142 142
 });
143 143
 
144  
-test("focusable -  not natively focusable with various tabindex", function() {
  144
+test("focusable - not natively focusable with various tabindex", function() {
145 145
   expect(4);
146 146
   
147 147
   isFocusable('#spanTabindex0', 'span, tabindex 0');
Txt ui/jquery.ui.core.js
  • View file @ 3f070bd
... ...
@@ -203,7 +203,10 @@ $.extend($.expr[':'], {
203 203
         : !isNaN(tabIndex))
204 204
       // the element and all of its ancestors must be visible
205 205
       // the browser may report that the area is hidden
206  
-      && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
  206
+      && !$(element).parents().andSelf().filter(function() {
  207
+        return $.curCSS( this, "visibility" ) === "hidden" ||
  208
+          $.expr.filters.hidden( this );
  209
+      }).length;
207 210
   },
208 211
 
209 212
   tabbable: function(element) {

0 notes on commit 3f070bd

Please log in to comment.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server
  • English
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文