@@ -200,6 +200,7 @@ $.widget( "ui.selectmenu", {
200
200
this . button . trigger ( "focus" ) ;
201
201
}
202
202
203
+ this . isOpen = true ;
203
204
this . _toggleAttr ( ) ;
204
205
205
206
if ( this . items && ! this . options . dropdown ) {
@@ -225,15 +226,14 @@ $.widget( "ui.selectmenu", {
225
226
of : this . button
226
227
} , this . options . position ) ) ;
227
228
228
- this . isOpen = true ;
229
229
this . _trigger ( "open" , event ) ;
230
230
}
231
231
} ,
232
232
233
233
close : function ( event ) {
234
234
if ( this . isOpen ) {
235
- this . _toggleAttr ( ) ;
236
235
this . isOpen = false ;
236
+ this . _toggleAttr ( ) ;
237
237
this . _trigger ( "close" , event ) ;
238
238
}
239
239
} ,
@@ -403,11 +403,11 @@ $.widget( "ui.selectmenu", {
403
403
404
404
_toggleAttr : function ( ) {
405
405
if ( this . options . dropdown ) {
406
- this . button . toggleClass ( 'ui-corner-top' , ! this . isOpen ) . toggleClass ( 'ui-corner-all' , this . isOpen ) ;
406
+ this . button . toggleClass ( 'ui-corner-top' , this . isOpen ) . toggleClass ( 'ui-corner-all' , ! this . isOpen ) ;
407
407
}
408
- this . menuWrap . toggleClass ( 'ui-selectmenu-open' , ! this . isOpen ) ;
409
- this . menu . attr ( "aria-hidden" , this . isOpen ) ;
410
- this . button . attr ( "aria-expanded" , ! this . isOpen ) ;
408
+ this . menuWrap . toggleClass ( 'ui-selectmenu-open' , this . isOpen ) ;
409
+ this . menu . attr ( "aria-hidden" , ! this . isOpen ) ;
410
+ this . button . attr ( "aria-expanded" , this . isOpen ) ;
411
411
} ,
412
412
413
413
_getCreateOptions : function ( ) {
0 commit comments