File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 39
39
_create : function ( ) {
40
40
var input ,
41
41
that = this ,
42
+ wasOpen = false ,
42
43
select = this . element . hide ( ) ,
43
44
selected = select . children ( ":selected" ) ,
44
45
value = selected . val ( ) ? selected . text ( ) : "" ,
129
130
} )
130
131
. removeClass ( "ui-corner-all" )
131
132
. addClass ( "ui-corner-right ui-combobox-toggle" )
133
+ . mousedown ( function ( ) {
134
+ wasOpen = input . autocomplete ( "widget" ) . is ( ":visible" ) ;
135
+ } )
132
136
. click ( function ( ) {
137
+ input . focus ( ) ;
138
+
133
139
// close if already visible
134
- if ( input . autocomplete ( "widget" ) . is ( ":visible" ) ) {
135
- input . autocomplete ( "close" ) ;
136
- removeIfInvalid ( input ) ;
140
+ if ( wasOpen ) {
137
141
return ;
138
142
}
139
143
140
- // work around a bug (likely same cause as #5265)
141
- $ ( this ) . blur ( ) ;
142
-
143
144
// pass empty string as value to search for, displaying all results
144
145
input . autocomplete ( "search" , "" ) ;
145
- input . focus ( ) ;
146
146
} ) ;
147
147
148
148
input . tooltip ( {
You can’t perform that action at this time.
0 commit comments