From 13d8d65ef98c1f1f52fa6e60f21025319556a6ae Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Sun, 30 Apr 2023 14:40:45 +0300 Subject: [PATCH] hints: don't process elements that already have a title --- javascript/hints.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/javascript/hints.js b/javascript/hints.js index e7d17d36..8d1967a7 100644 --- a/javascript/hints.js +++ b/javascript/hints.js @@ -118,7 +118,9 @@ titles = { onUiUpdate(function(){ 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){ tooltip = titles[span.value];