mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	Automatically trigger autocomplete on focus.
This commit is contained in:
		
							parent
							
								
									acf37f9327
								
							
						
					
					
						commit
						2387bbd17f
					
				@ -84,6 +84,13 @@ export default class EmptyTypeWidget extends TypeWidget {
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Automatically trigger autocomplete on focus.
 | 
			
		||||
        this.$autoComplete.on('focus', () => {
 | 
			
		||||
            // simulate pressing down arrow to trigger autocomplete
 | 
			
		||||
            this.$autoComplete.trigger($.Event('keydown', { which: 40 })); // arrow down
 | 
			
		||||
            this.$autoComplete.trigger($.Event('keydown', { which: 38 })); // arrow up
 | 
			
		||||
        });
 | 
			
		||||
        
 | 
			
		||||
        this.$autoComplete
 | 
			
		||||
            .trigger('focus')
 | 
			
		||||
            .trigger('select');
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user