mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	fix(mobile): error when closing modals
This commit is contained in:
		
							parent
							
								
									540c1b2207
								
							
						
					
					
						commit
						a83931a421
					
				@ -255,7 +255,10 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) {
 | 
				
			|||||||
    bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
 | 
					    bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $dialog.on('hidden.bs.modal', () => {
 | 
					    $dialog.on('hidden.bs.modal', () => {
 | 
				
			||||||
        $(".aa-input").autocomplete("close");
 | 
					        const $autocompleteEl = $(".aa-input");
 | 
				
			||||||
 | 
					        if ("autocomplete" in $autocompleteEl) {
 | 
				
			||||||
 | 
					            $autocompleteEl.autocomplete("close");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!glob.activeDialog || glob.activeDialog === $dialog) {
 | 
					        if (!glob.activeDialog || glob.activeDialog === $dialog) {
 | 
				
			||||||
            focusSavedElement();
 | 
					            focusSavedElement();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user