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 41
41
typeahead . setVal ( ) // clear value on page reload
42
42
input . on ( 'autocomplete:closed' , clearSearch . bind ( typeahead ) )
43
43
input . on ( 'autocomplete:cursorchanged autocomplete:cursorremoved' , saveSearchState . bind ( typeahead ) )
44
- input . on ( 'autocomplete:selected' , disableClose )
44
+ input . on ( 'autocomplete:selected' , onSuggestionSelected )
45
45
input . on ( 'autocomplete:updated' , onResultsUpdated . bind ( typeahead ) )
46
46
dropdown . _ensureVisible = ensureVisible
47
47
menu . off ( 'mousedown.aa' )
93
93
e . stopPropagation ( )
94
94
}
95
95
96
- function disableClose ( e ) {
97
- e . isDefaultPrevented = function ( ) {
98
- return true
99
- }
100
- }
101
-
102
96
function ensureVisible ( el ) {
103
97
var container = this . datasets [ 0 ] . $el [ 0 ]
104
98
if ( container . scrollHeight === container . offsetHeight ) return
158
152
} , 0 )
159
153
}
160
154
155
+ function onSuggestionSelected ( e ) {
156
+ e . isDefaultPrevented = function ( ) {
157
+ return true
158
+ }
159
+ }
160
+
161
161
function clearSearch ( ) {
162
162
this . setVal ( )
163
163
}
You can’t perform that action at this time.
0 commit comments