mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 07:01:31 +08:00 
			
		
		
		
	fix hiding autocompletes after closing tab, closes #1034
This commit is contained in:
		
							parent
							
								
									2526715aa4
								
							
						
					
					
						commit
						3db84daf94
					
				@ -249,6 +249,9 @@ export default class TabManager extends Component {
 | 
				
			|||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // close dangling autocompletes after closing the tab
 | 
				
			||||||
 | 
					        $(".aa-input").autocomplete("close");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        await this.triggerEvent('beforeTabRemove', {tabId});
 | 
					        await this.triggerEvent('beforeTabRemove', {tabId});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (this.tabContexts.length <= 1) {
 | 
					        if (this.tabContexts.length <= 1) {
 | 
				
			||||||
@ -267,9 +270,6 @@ export default class TabManager extends Component {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        this.children = this.children.filter(tc => tc.tabId !== tabId);
 | 
					        this.children = this.children.filter(tc => tc.tabId !== tabId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // remove dangling autocompletes after closing the tab
 | 
					 | 
				
			||||||
        $(".algolia-autocomplete").remove();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        this.triggerEvent('tabRemoved', {tabId});
 | 
					        this.triggerEvent('tabRemoved', {tabId});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.tabsUpdate.scheduleUpdate();
 | 
					        this.tabsUpdate.scheduleUpdate();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user