File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 _create : function ( ) {
4040 var input ,
4141 that = this ,
42+ wasOpen = false ,
4243 select = this . element . hide ( ) ,
4344 selected = select . children ( ":selected" ) ,
4445 value = selected . val ( ) ? selected . text ( ) : "" ,
129130 } )
130131 . removeClass ( "ui-corner-all" )
131132 . addClass ( "ui-corner-right ui-combobox-toggle" )
133+ . mousedown ( function ( ) {
134+ wasOpen = input . autocomplete ( "widget" ) . is ( ":visible" ) ;
135+ } )
132136 . click ( function ( ) {
137+ input . focus ( ) ;
138+
133139 // close if already visible
134- if ( input . autocomplete ( "widget" ) . is ( ":visible" ) ) {
135- input . autocomplete ( "close" ) ;
136- removeIfInvalid ( input ) ;
140+ if ( wasOpen ) {
137141 return ;
138142 }
139143
140- // work around a bug (likely same cause as #5265)
141- $ ( this ) . blur ( ) ;
142-
143144 // pass empty string as value to search for, displaying all results
144145 input . autocomplete ( "search" , "" ) ;
145- input . focus ( ) ;
146146 } ) ;
147147
148148 input . tooltip ( {
You can’t perform that action at this time.
0 commit comments