1361600878135dfd42eae968c25e0370eae423c6 chmalee Wed Aug 28 13:55:49 2024 -0700 Remove tooltips from divs that will become dialog boxes, refs #33977 diff --git src/hg/js/utils.js src/hg/js/utils.js index a1435d3..b9f0241 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -4206,31 +4206,35 @@ if (ele1) { ele1.setAttribute("mouseoverText", text); ele1.addEventListener("mouseover", showMouseover, {capture: true}); } } function titleTagToMouseover(mapEl) { /* for a given area tag, extract the title text into a div that can be positioned * like a standard tooltip mouseover next to the item */ addMouseover(mapEl, mapEl.title); } function convertTitleTagsToMouseovers() { /* make all the title tags in the document have mouseovers */ - $("[title]").each(function(i, a) { + document.querySelectorAll("[title]").forEach(function(a, i) { + if (a.id !== "" && (a.id === "hotkeyHelp" || a.id.endsWith("Dialog") || a.id.endsWith("Popup"))) { + // these divs are populated by ui-dialog, they should not have tooltips + return; + } if (a.title !== undefined && (a.title.startsWith("click & drag to scroll") || a.title.startsWith("drag select or click to zoom"))) a.title = ""; else if (a.title !== undefined && a.title.length > 0) { if (a.title.startsWith("Click to alter the display density")) { // these tooltips have a longer delay: a.setAttribute("tooltipDelay", "delayed"); } titleTagToMouseover(a); } }); /* Mouseover should clear if you leave the document window altogether */ document.body.addEventListener("mouseleave", (ev) => { clearTimeout(mouseoverTimer);