af507965b2d219779285784fe96f37c78bab19c4
chmalee
  Mon Sep 29 13:04:27 2025 -0700
Make mouseover on gear icon trigger the same mouseover as without the gear icon, refs #36232

diff --git src/hg/js/utils.js src/hg/js/utils.js
index 142409d056b..3170d0a20d0 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -3871,30 +3871,40 @@
                         span.addEventListener("click", (e) => {
                             // trigger a click on the <a> of the td
                             e.preventDefault();
                             e.stopPropagation();
                             e.stopImmediatePropagation();
                             const clickEvent = new MouseEvent("click", {
                                 bubbles: true,
                                 cancelable: true,
                                 view: window,
                                 clientX: tdBtn.getBoundingClientRect().left + 15,
                                 clientY: tdBtn.getBoundingClientRect().top,
                                 button: 1,
                             });
                             tdBtn.children[0].dispatchEvent(clickEvent);
                         });
+                        let tdp = tdBtn.querySelector("p.btn");
+                        if (tdp) {
+                            span.addEventListener("mouseenter", (e) => {
+                                // trigger a mouseover on the actual btn
+                                dragReorder.buttonMouseOver.call(tdp, e);
+                            });
+                            span.addEventListener("mouseleave", (e) => {
+                                dragReorder.buttonMouseOut.call(tdp, e);
+                            });
+                        }
                     }
                 }
 
                 // add an 'x' icon in the label area to hide the track
                 let tdSide = document.getElementById("td_side_" + id);
                 if (tdSide) {
                     // mouseover event fires if you stop moving the mouse while still
                     // hovering the element and then move it again, don't make
                     // duplicate btns in that case
                     if (!document.getElementById("close_btn_" + id)) {
                         let btn = document.createElement("span");
                         btn.id = "close_btn_" + id;
                         btn.classList.add("hgTracksCloseIcon", "ui-icon", "ui-icon-close");
                         btn.title = "Hide track";
                         tdSide.appendChild(btn);