File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2424 lineNumbers : true ,
2525 onKeyEvent : function ( i , e ) {
2626 // Hook into ctrl-space
27- if ( e . keyCode == 32 && ( e . ctrlKey || e . metaKey ) && ! e . altKey ) return startComplete ( ) ;
27+ if ( e . keyCode == 32 && ( e . ctrlKey || e . metaKey ) && ! e . altKey ) {
28+ e . stop ( ) ;
29+ return startComplete ( ) ;
30+ }
2831 }
2932 } ) ;
3033
7982 function pick ( ) {
8083 insert ( sel . options [ sel . selectedIndex ] . value ) ;
8184 close ( ) ;
82- editor . focus ( ) ;
85+ setTimeout ( function ( ) { editor . focus ( ) ; } , 50 ) ;
8386 }
8487 connect ( sel , "blur" , close ) ;
8588 connect ( sel , "keydown" , function ( event ) {
8891 if ( code == 13 || code == 32 ) { event . stop ( ) ; pick ( ) ; }
8992 // Escape
9093 else if ( code == 27 ) { event . stop ( ) ; close ( ) ; editor . focus ( ) ; }
91- else if ( code != 38 && code != 40 ) { close ( ) ; editor . focus ( ) ; }
94+ else if ( code != 38 && code != 40 ) { close ( ) ; editor . focus ( ) ; setTimeout ( startComplete , 50 ) ; }
9295 } ) ;
9396 connect ( sel , "dblclick" , pick ) ;
9497
You can’t perform that action at this time.
0 commit comments