File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 179179
180180 // Listen for click event on suggestions list:
181181 container . on ( 'click' , suggestionSelector , function ( ) {
182- that . select ( $ ( this ) . data ( 'index' ) ) ;
182+ that . select ( $ ( this ) . data ( 'index' ) , false ) ;
183183 } ) ;
184184
185185 that . fixPosition ( ) ;
297297 that . hide ( ) ;
298298 return ;
299299 }
300- that . select ( that . selectedIndex ) ;
300+ that . select ( that . selectedIndex , e . keyCode === keys . RETURN ) ;
301301 if ( e . keyCode === keys . TAB && this . options . tabDisabled === false ) {
302302 return ;
303303 }
515515 return null ;
516516 } ,
517517
518- select : function ( i ) {
518+ select : function ( i , shouldIgnoreNextValueChange ) {
519519 var that = this ,
520520 selectedValue = that . suggestions [ i ] ;
521521
522522 if ( selectedValue ) {
523523 that . el . val ( selectedValue ) ;
524- that . ignoreValueChange = true ;
524+ that . ignoreValueChange = shouldIgnoreNextValueChange ;
525525 that . hide ( ) ;
526526 that . onSelect ( i ) ;
527527 }
You can’t perform that action at this time.
0 commit comments