mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 07:01:31 +08:00 
			
		
		
		
	fix(client): drop down no longer hiding when it should
This commit is contained in:
		
							parent
							
								
									85f7d90c90
								
							
						
					
					
						commit
						a28dff7525
					
				@ -46,9 +46,9 @@ class ContextMenu {
 | 
			
		||||
        this.isMobile = utils.isMobile();
 | 
			
		||||
 | 
			
		||||
        if (this.isMobile) {
 | 
			
		||||
            this.$cover.on("click", this.hide);
 | 
			
		||||
            this.$cover.on("click", () => this.hide());
 | 
			
		||||
        } else {
 | 
			
		||||
            $(document).on('click', (e) => this.hide);
 | 
			
		||||
            $(document).on('click', (e) => this.hide());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -218,7 +218,6 @@ class ContextMenu {
 | 
			
		||||
        // this date checking comes from change in FF66 - https://github.com/zadam/trilium/issues/468
 | 
			
		||||
        // "contextmenu" event also triggers "click" event which depending on the timing can close the just opened context menu
 | 
			
		||||
        // we might filter out right clicks, but then it's better if even right clicks close the context menu
 | 
			
		||||
        console.warn(new Error());
 | 
			
		||||
        if (Date.now() - this.dateContextMenuOpenedMs > 300) {
 | 
			
		||||
            // seems like if we hide the menu immediately, some clicks can get propagated to the underlying component
 | 
			
		||||
            // see https://github.com/zadam/trilium/pull/3805 for details
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user