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