mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	fix(client/ts): dropdowns not working after conversion
This commit is contained in:
		
							parent
							
								
									be0c80249e
								
							
						
					
					
						commit
						e88cbd5991
					
				| @ -1,5 +1,4 @@ | |||||||
| import dayjs from "dayjs"; | import dayjs from "dayjs"; | ||||||
| import { Modal } from "bootstrap"; |  | ||||||
| 
 | 
 | ||||||
| function reloadFrontendApp(reason?: string) { | function reloadFrontendApp(reason?: string) { | ||||||
|     if (reason) { |     if (reason) { | ||||||
| @ -205,6 +204,8 @@ function getMimeTypeClass(mime: string) { | |||||||
| 
 | 
 | ||||||
| function closeActiveDialog() { | function closeActiveDialog() { | ||||||
|     if (glob.activeDialog) { |     if (glob.activeDialog) { | ||||||
|  |         // TODO: Fix once we use proper ES imports.
 | ||||||
|  |         //@ts-ignore
 | ||||||
|         Modal.getOrCreateInstance(glob.activeDialog[0]).hide(); |         Modal.getOrCreateInstance(glob.activeDialog[0]).hide(); | ||||||
|         glob.activeDialog = null; |         glob.activeDialog = null; | ||||||
|     } |     } | ||||||
| @ -249,6 +250,8 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     saveFocusedElement(); |     saveFocusedElement(); | ||||||
|  |     // TODO: Fix once we use proper ES imports.
 | ||||||
|  |     //@ts-ignore
 | ||||||
|     Modal.getOrCreateInstance($dialog[0]).show(); |     Modal.getOrCreateInstance($dialog[0]).show(); | ||||||
| 
 | 
 | ||||||
|     $dialog.on('hidden.bs.modal', () => { |     $dialog.on('hidden.bs.modal', () => { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran