Skip to content

Commit fe5534b

Browse files
committed
Core: Style updates
Ref #14246 Ref gh-1588
1 parent c9fbb76 commit fe5534b

File tree

5 files changed

+39
-37
lines changed

5 files changed

+39
-37
lines changed

tests/unit/core/core.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test( "innerWidth - getter", function() {
1717
equal( el.innerWidth(), 122, "getter passthru" );
1818
el.hide();
1919
equal( el.innerWidth(), 122, "getter passthru when hidden" );
20-
});
20+
} );
2121

2222
test( "innerWidth - setter", function() {
2323
expect( 2 );
@@ -28,7 +28,7 @@ test( "innerWidth - setter", function() {
2828
el.hide();
2929
el.innerWidth( 100 );
3030
equal( el.width(), 78, "width set properly when hidden" );
31-
});
31+
} );
3232

3333
test( "innerHeight - getter", function() {
3434
expect( 2 );
@@ -37,7 +37,7 @@ test( "innerHeight - getter", function() {
3737
equal( el.innerHeight(), 70, "getter passthru" );
3838
el.hide();
3939
equal( el.innerHeight(), 70, "getter passthru when hidden" );
40-
});
40+
} );
4141

4242
test( "innerHeight - setter", function() {
4343
expect( 2 );
@@ -48,7 +48,7 @@ test( "innerHeight - setter", function() {
4848
el.hide();
4949
el.innerHeight( 50 );
5050
equal( el.height(), 30, "height set properly when hidden" );
51-
});
51+
} );
5252

5353
test( "outerWidth - getter", function() {
5454
expect( 2 );
@@ -57,7 +57,7 @@ test( "outerWidth - getter", function() {
5757
equal( el.outerWidth(), 140, "getter passthru" );
5858
el.hide();
5959
equal( el.outerWidth(), 140, "getter passthru when hidden" );
60-
});
60+
} );
6161

6262
test( "outerWidth - setter", function() {
6363
expect( 2 );
@@ -68,16 +68,16 @@ test( "outerWidth - setter", function() {
6868
el.hide();
6969
el.outerWidth( 120 );
7070
equal( el.width(), 80, "width set properly when hidden" );
71-
});
71+
} );
7272

7373
test( "outerWidth(true) - getter", function() {
7474
expect( 2 );
7575
var el = $( "#dimensions" );
7676

77-
equal( el.outerWidth(true), 154, "getter passthru w/ margin" );
77+
equal( el.outerWidth( true ), 154, "getter passthru w/ margin" );
7878
el.hide();
79-
equal( el.outerWidth(true), 154, "getter passthru w/ margin when hidden" );
80-
});
79+
equal( el.outerWidth( true ), 154, "getter passthru w/ margin when hidden" );
80+
} );
8181

8282
test( "outerWidth(true) - setter", function() {
8383
expect( 2 );
@@ -88,7 +88,7 @@ test( "outerWidth(true) - setter", function() {
8888
el.hide();
8989
el.outerWidth( 120, true );
9090
equal( el.width(), 66, "width set properly when hidden" );
91-
});
91+
} );
9292

9393
test( "outerHeight - getter", function() {
9494
expect( 2 );
@@ -97,7 +97,7 @@ test( "outerHeight - getter", function() {
9797
equal( el.outerHeight(), 86, "getter passthru" );
9898
el.hide();
9999
equal( el.outerHeight(), 86, "getter passthru when hidden" );
100-
});
100+
} );
101101

102102
test( "outerHeight - setter", function() {
103103
expect( 2 );
@@ -108,16 +108,16 @@ test( "outerHeight - setter", function() {
108108
el.hide();
109109
el.outerHeight( 70 );
110110
equal( el.height(), 34, "height set properly when hidden" );
111-
});
111+
} );
112112

113113
test( "outerHeight(true) - getter", function() {
114114
expect( 2 );
115115
var el = $( "#dimensions" );
116116

117-
equal( el.outerHeight(true), 98, "getter passthru w/ margin" );
117+
equal( el.outerHeight( true ), 98, "getter passthru w/ margin" );
118118
el.hide();
119-
equal( el.outerHeight(true), 98, "getter passthru w/ margin when hidden" );
120-
});
119+
equal( el.outerHeight( true ), 98, "getter passthru w/ margin when hidden" );
120+
} );
121121

122122
test( "outerHeight(true) - setter", function() {
123123
expect( 2 );
@@ -128,7 +128,7 @@ test( "outerHeight(true) - setter", function() {
128128
el.hide();
129129
el.outerHeight( 80, true );
130130
equal( el.height(), 32, "height set properly when hidden" );
131-
});
131+
} );
132132

133133
test( "uniqueId / removeUniqueId", function() {
134134
expect( 3 );
@@ -138,7 +138,7 @@ test( "uniqueId / removeUniqueId", function() {
138138
ok( /ui-id-\d+$/.test( el.attr( "id" ) ), "element has generated id" );
139139
el.removeUniqueId();
140140
equal( el.attr( "id" ), null, "unique id has been removed from element" );
141-
});
141+
} );
142142

143143
test( "Labels", function() {
144144
expect( 2 );

tests/unit/core/selector.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function isFocusable( selector, msg ) {
1414
}
1515

1616
function isNotFocusable( selector, msg ) {
17-
QUnit.push( $( selector ).length && !$( selector ).is(":focusable"), null, null,
17+
QUnit.push( $( selector ).length && !$( selector ).is( ":focusable" ), null, null,
1818
msg + " - selector " + selector + " is not focusable" );
1919
}
2020

@@ -85,7 +85,7 @@ test( "data", function() {
8585

8686
element = $( "<div>" ).data( "test", function() {} );
8787
shouldHaveData( "data set to function" );
88-
});
88+
} );
8989

9090
test( "focusable - visible, enabled elements", function() {
9191
expect( 18 );
@@ -108,7 +108,7 @@ test( "focusable - visible, enabled elements", function() {
108108
isNotFocusable( "#visibleAncestor-div", "div" );
109109
isFocusable( "#visibleAncestor-spanWithTabindex", "span with tabindex" );
110110
isFocusable( "#visibleAncestor-divWithNegativeTabindex", "div with tabindex" );
111-
});
111+
} );
112112

113113
test( "focusable - disabled elements", function() {
114114
expect( 9 );
@@ -122,7 +122,7 @@ test( "focusable - disabled elements", function() {
122122
isNotFocusable( "#disabledElement-button", "button" );
123123
isNotFocusable( "#disabledElement-select", "select" );
124124
isNotFocusable( "#disabledElement-textarea", "textarea" );
125-
});
125+
} );
126126

127127
test( "focusable - hidden styles", function() {
128128
expect( 8 );
@@ -138,7 +138,7 @@ test( "focusable - hidden styles", function() {
138138

139139
isNotFocusable( "#displayNone-span", "span with tabindex, display: none" );
140140
isNotFocusable( "#visibilityHidden-span", "span with tabindex, visibility: hidden" );
141-
});
141+
} );
142142

143143
test( "focusable - natively focusable with various tabindex", function() {
144144
expect( 4 );
@@ -147,7 +147,7 @@ test( "focusable - natively focusable with various tabindex", function() {
147147
isFocusable( "#inputTabindex10", "input, tabindex 10" );
148148
isFocusable( "#inputTabindex-1", "input, tabindex -1" );
149149
isFocusable( "#inputTabindex-50", "input, tabindex -50" );
150-
});
150+
} );
151151

152152
test( "focusable - not natively focusable with various tabindex", function() {
153153
expect( 4 );
@@ -156,21 +156,21 @@ test( "focusable - not natively focusable with various tabindex", function() {
156156
isFocusable( "#spanTabindex10", "span, tabindex 10" );
157157
isFocusable( "#spanTabindex-1", "span, tabindex -1" );
158158
isFocusable( "#spanTabindex-50", "span, tabindex -50" );
159-
});
159+
} );
160160

161161
test( "focusable - area elements", function() {
162162
expect( 3 );
163163

164164
isFocusable( "#areaCoordsHref", "coords and href" );
165165
isFocusable( "#areaNoCoordsHref", "href but no coords" );
166166
isNotFocusable( "#areaNoImg", "not associated with an image" );
167-
});
167+
} );
168168

169169
test( "focusable - dimensionless parent with overflow", function() {
170170
expect( 1 );
171171

172172
isFocusable( "#dimensionlessParent", "input" );
173-
});
173+
} );
174174

175175
test( "tabbable - visible, enabled elements", function() {
176176
expect( 18 );
@@ -193,7 +193,7 @@ test( "tabbable - visible, enabled elements", function() {
193193
isNotTabbable( "#visibleAncestor-div", "div" );
194194
isTabbable( "#visibleAncestor-spanWithTabindex", "span with tabindex" );
195195
isNotTabbable( "#visibleAncestor-divWithNegativeTabindex", "div with tabindex" );
196-
});
196+
} );
197197

198198
test( "tabbable - disabled elements", function() {
199199
expect( 9 );
@@ -207,7 +207,7 @@ test( "tabbable - disabled elements", function() {
207207
isNotTabbable( "#disabledElement-button", "button" );
208208
isNotTabbable( "#disabledElement-select", "select" );
209209
isNotTabbable( "#disabledElement-textarea", "textarea" );
210-
});
210+
} );
211211

212212
test( "tabbable - hidden styles", function() {
213213
expect( 8 );
@@ -223,7 +223,7 @@ test( "tabbable - hidden styles", function() {
223223

224224
isNotTabbable( "#displayNone-span", "span with tabindex, display: none" );
225225
isNotTabbable( "#visibilityHidden-span", "span with tabindex, visibility: hidden" );
226-
});
226+
} );
227227

228228
test( "tabbable - natively tabbable with various tabindex", function() {
229229
expect( 4 );
@@ -232,7 +232,7 @@ test( "tabbable - natively tabbable with various tabindex", function() {
232232
isTabbable( "#inputTabindex10", "input, tabindex 10" );
233233
isNotTabbable( "#inputTabindex-1", "input, tabindex -1" );
234234
isNotTabbable( "#inputTabindex-50", "input, tabindex -50" );
235-
});
235+
} );
236236

237237
test( "tabbable - not natively tabbable with various tabindex", function() {
238238
expect( 4 );
@@ -241,21 +241,21 @@ test( "tabbable - not natively tabbable with various tabindex", function() {
241241
isTabbable( "#spanTabindex10", "span, tabindex 10" );
242242
isNotTabbable( "#spanTabindex-1", "span, tabindex -1" );
243243
isNotTabbable( "#spanTabindex-50", "span, tabindex -50" );
244-
});
244+
} );
245245

246246
test( "tabbable - area elements", function() {
247247
expect( 3 );
248248

249249
isTabbable( "#areaCoordsHref", "coords and href" );
250250
isTabbable( "#areaNoCoordsHref", "href but no coords" );
251251
isNotTabbable( "#areaNoImg", "not associated with an image" );
252-
});
252+
} );
253253

254254
test( "tabbable - dimensionless parent with overflow", function() {
255255
expect( 1 );
256256

257257
isTabbable( "#dimensionlessParent", "input" );
258-
});
258+
} );
259259

260260
test( "escapeSelector", function() {
261261
expect( 1 );

ui/data.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ return $.extend( $.expr[ ":" ], {
3030
return !!$.data( elem, dataName );
3131
};
3232
} ) :
33-
// support: jQuery <1.8
33+
34+
// Support: jQuery <1.8
3435
function( elem, i, match ) {
3536
return !!$.data( elem, match[ 3 ] );
3637
}

ui/focusable.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525
} ( function( $ ) {
2626

27-
// selectors
27+
// Selectors
2828
$.ui.focusable = function( element, hasTabindex ) {
2929
var map, mapName, img,
3030
nodeName = element.nodeName.toLowerCase();
@@ -42,7 +42,8 @@ $.ui.focusable = function( element, hasTabindex ) {
4242
"a" === nodeName ?
4343
element.href || hasTabindex :
4444
hasTabindex ) &&
45-
// the element and all of its ancestors must be visible
45+
46+
// The element and all of its ancestors must be visible
4647
visible( element );
4748
};
4849

ui/jquery-1-7.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525
}( function( $ ) {
2626

27-
// support: jQuery 1.7 only
27+
// Support: jQuery 1.7 only
2828
// Not a great way to check versions, but since we only support 1.7+ and only
2929
// need to detect <1.8, this is a simple check that should suffice. Checking
3030
// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0

0 commit comments

Comments
 (0)