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 4141 typeahead . setVal ( ) // clear value on page reload
4242 input . on ( 'autocomplete:closed' , clearSearch . bind ( typeahead ) )
4343 input . on ( 'autocomplete:cursorchanged autocomplete:cursorremoved' , saveSearchState . bind ( typeahead ) )
44- input . on ( 'autocomplete:selected' , disableClose )
44+ input . on ( 'autocomplete:selected' , onSuggestionSelected )
4545 input . on ( 'autocomplete:updated' , onResultsUpdated . bind ( typeahead ) )
4646 dropdown . _ensureVisible = ensureVisible
4747 menu . off ( 'mousedown.aa' )
9393 e . stopPropagation ( )
9494 }
9595
96- function disableClose ( e ) {
97- e . isDefaultPrevented = function ( ) {
98- return true
99- }
100- }
101-
10296 function ensureVisible ( el ) {
10397 var container = this . datasets [ 0 ] . $el [ 0 ]
10498 if ( container . scrollHeight === container . offsetHeight ) return
158152 } , 0 )
159153 }
160154
155+ function onSuggestionSelected ( e ) {
156+ e . isDefaultPrevented = function ( ) {
157+ return true
158+ }
159+ }
160+
161161 function clearSearch ( ) {
162162 this . setVal ( )
163163 }
You can’t perform that action at this time.
0 commit comments