Skip to content

Commit 6edc790

Browse files
committed
Selectmenu: renaming of internal variable opened to isOpen
1 parent 02ac48f commit 6edc790

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ui/jquery.ui.selectmenu.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ $.widget( "ui.selectmenu", {
138138
that._trigger( "change", event, { item: item } );
139139
}
140140

141-
if ( that.opened ) {
141+
if ( that.isOpen ) {
142142
event.preventDefault();
143143
that.close( event, true);
144144
}
@@ -157,7 +157,7 @@ $.widget( "ui.selectmenu", {
157157
// document click closes menu
158158
this._bind( document, {
159159
'click': function( event ) {
160-
if ( this.opened && !$( event.target ).closest( "#" + this.ids.button).length ) {
160+
if ( this.isOpen && !$( event.target ).closest( "#" + this.ids.button).length ) {
161161
this.close( event );
162162
}
163163
}
@@ -227,21 +227,21 @@ $.widget( "ui.selectmenu", {
227227
of: this.button
228228
}, this.options.position ));
229229

230-
this.opened = true;
230+
this.isOpen = true;
231231
this._trigger( "open", event );
232232
}
233233
},
234234

235235
close: function( event, focus ) {
236-
if ( this.opened ) {
236+
if ( this.isOpen ) {
237237
if ( this.options.dropdown ) {
238238
this.button
239239
.addClass( 'ui-corner-all' )
240240
.removeClass( 'ui-corner-top' );
241241
}
242242

243243
this.menuWrap.removeClass( 'ui-selectmenu-open' );
244-
this.opened = false;
244+
this.isOpen = false;
245245

246246
if ( focus ) {
247247
this.button.focus();
@@ -286,13 +286,13 @@ $.widget( "ui.selectmenu", {
286286
},
287287

288288
_move: function( key, event ) {
289-
if ( !this.opened ) {
289+
if ( !this.isOpen ) {
290290
this.menu.menu( "focus", event, this._getSelectedItem() );
291291
}
292292

293293
this.menu.menu( key, event );
294294

295-
if ( !this.opened ) {
295+
if ( !this.isOpen ) {
296296
this.menu.menu( "select", event );
297297
}
298298
},
@@ -302,7 +302,7 @@ $.widget( "ui.selectmenu", {
302302
},
303303

304304
_toggle: function( event ) {
305-
if ( this.opened ) {
305+
if ( this.isOpen ) {
306306
this.close( event );
307307
} else {
308308
this.open( event );
@@ -317,12 +317,12 @@ $.widget( "ui.selectmenu", {
317317
keydown: function( event ) {
318318
switch (event.keyCode) {
319319
case $.ui.keyCode.TAB:
320-
if ( this.opened ) {
320+
if ( this.isOpen ) {
321321
this.close( event );
322322
}
323323
break;
324324
case $.ui.keyCode.ENTER:
325-
if ( this.opened ) {
325+
if ( this.isOpen ) {
326326
this.menu.menu( "select", this._getSelectedItem() );
327327
}
328328
event.preventDefault();

0 commit comments

Comments
 (0)