hints: don't process elements that already have a title

This commit is contained in:
Aarni Koskela 2023-04-30 14:40:45 +03:00
parent 5e4a0e3d24
commit 13d8d65ef9
1 changed files with 3 additions and 1 deletions

View File

@ -118,7 +118,9 @@ titles = {
onUiUpdate(function(){ onUiUpdate(function(){
gradioApp().querySelectorAll('span, button, select, p').forEach(function(span){ gradioApp().querySelectorAll('span, button, select, p').forEach(function(span){
tooltip = titles[span.textContent]; if (span.title) return; // already has a title
let tooltip = titles[span.textContent];
if(!tooltip){ if(!tooltip){
tooltip = titles[span.value]; tooltip = titles[span.value];