mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	hide global menu after changing note/context
This commit is contained in:
		
							parent
							
								
									0b270ee87a
								
							
						
					
					
						commit
						fd8a2d4d92
					
				| @ -230,6 +230,7 @@ export default class GlobalMenuWidget extends BasicWidget { | |||||||
|     doRender() { |     doRender() { | ||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
| 
 | 
 | ||||||
|  |         this.$dropdown = this.$widget.find("[data-toggle='dropdown']"); | ||||||
|         const $button = this.$widget.find(".global-menu-button"); |         const $button = this.$widget.find(".global-menu-button"); | ||||||
|         $button.tooltip({ trigger: "hover" }); |         $button.tooltip({ trigger: "hover" }); | ||||||
|         $button.on("click", () => $button.tooltip("hide")); |         $button.on("click", () => $button.tooltip("hide")); | ||||||
| @ -248,7 +249,7 @@ export default class GlobalMenuWidget extends BasicWidget { | |||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             this.$widget.find("[data-toggle='dropdown']").dropdown('toggle'); |             this.$dropdown.dropdown('toggle'); | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         this.$widget.find(".global-menu-button-update-available").append( |         this.$widget.find(".global-menu-button-update-available").append( | ||||||
| @ -310,4 +311,12 @@ export default class GlobalMenuWidget extends BasicWidget { | |||||||
|     downloadLatestVersionCommand() { |     downloadLatestVersionCommand() { | ||||||
|         window.open("https://github.com/zadam/trilium/releases/latest"); |         window.open("https://github.com/zadam/trilium/releases/latest"); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     activeContextChangedEvent() { | ||||||
|  |         this.$dropdown.dropdown('hide'); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     noteSwitchedEvent() { | ||||||
|  |         this.$dropdown.dropdown('hide'); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam