mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	client: Fix another case of tooltip overlap
This commit is contained in:
		
							parent
							
								
									84efc13b52
								
							
						
					
					
						commit
						9fa31db207
					
				| @ -16,7 +16,7 @@ function setupGlobalTooltip() { | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         cleanUpTooltips; | ||||
|         cleanUpTooltips(); | ||||
|     }); | ||||
| } | ||||
| 
 | ||||
| @ -94,7 +94,7 @@ async function mouseEnterHandler() { | ||||
|          | ||||
|         // Dismiss the tooltip immediately if a link was clicked inside the tooltip.
 | ||||
|         $(`.${tooltipClass} a`).on("click", (e) => { | ||||
|             $(this).tooltip('dispose'); | ||||
|             cleanUpTooltips(); | ||||
|         }); | ||||
| 
 | ||||
|         // the purpose of the code below is to:
 | ||||
| @ -102,15 +102,9 @@ async function mouseEnterHandler() { | ||||
|         //   click on links within tooltip etc. without tooltip disappearing
 | ||||
|         // - once the user moves the cursor away from both link and the tooltip, hide the tooltip
 | ||||
|         const checkTooltip = () => { | ||||
|             if (!$(`.${tooltipClass}`).is(':visible')) { | ||||
|                 console.log("Not visible anymore"); | ||||
| 
 | ||||
|                 return; | ||||
|             } | ||||
| 
 | ||||
|             if (!$(this).filter(":hover").length && !$(`.${linkId}:hover`).length) { | ||||
|                 // cursor is neither over the link nor over the tooltip, user likely is not interested
 | ||||
|                 $(this).tooltip('dispose'); | ||||
|                 cleanUpTooltips(); | ||||
|             } else { | ||||
|                 setTimeout(checkTooltip, 1000); | ||||
|             } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran