mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 01:34:27 +00:00 
			
		
		
		
	Only hide tooltip tippy instances (#24688)
Fix regression from https://github.com/go-gitea/gitea/pull/24648 where it was hiding non-tooltip tippy instances, like for example in the review panel which itself is a tippy instance, but with a different `role`.
This commit is contained in:
		@@ -18,8 +18,11 @@ export function createTippy(target, opts = {}) {
 | 
				
			|||||||
      visibleInstances.delete(instance);
 | 
					      visibleInstances.delete(instance);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    onShow: (instance) => {
 | 
					    onShow: (instance) => {
 | 
				
			||||||
 | 
					      // hide other tooltip instances so only one tooltip shows at a time
 | 
				
			||||||
      for (const visibleInstance of visibleInstances) {
 | 
					      for (const visibleInstance of visibleInstances) {
 | 
				
			||||||
        visibleInstance.hide(); // hide other instances
 | 
					        if (visibleInstance.role === 'tooltip') {
 | 
				
			||||||
 | 
					          visibleInstance.hide();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      visibleInstances.add(instance);
 | 
					      visibleInstances.add(instance);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user