62918b2049c18475349ce07a72d53dcd742b78df
chmalee
  Fri Oct 10 13:00:19 2025 -0700
Instead of creating the gear icon dynamically on mouseover of the track td/tr, stick them in the html by default but with display:hide, because creating them dynamically causes Chrome to misinterpret the mouseover/mouseleave events

diff --git src/hg/hgTracks/imageV2.c src/hg/hgTracks/imageV2.c
index eb51c3cc768..25dbf9b6fcd 100644
--- src/hg/hgTracks/imageV2.c
+++ src/hg/hgTracks/imageV2.c
@@ -1907,32 +1907,38 @@
                 tdb = tdbGetComposite(tdb);
             trackName = tdb->track;
             }
 
         // make quickLifted tracks have a green left button
         struct trackDb *tdb = imgTrack->tdb;
         struct trackHub *tHub = NULL;
         char *grpName = NULL;
         if (tdb != NULL)
             grpName = tdb->grp;
         if (grpName != NULL)
             tHub = grabHashedHub(grpName);
         char *btnType = "btn";
         if ((tHub != NULL) && startsWith("Quicklift", tHub->longLabel))
             btnType = "btnGreen";
-        hPrintf(" width:9px; display:none;' class='%s %sbtn btnN %s'></p>",
+        hPrintf(" width:9px; display:none;' class='%s %sbtn btnN %s'>",
                 trackName,(slice->link == NULL ? "inset " : ""), btnType);
+        // insert the gear spans with display: hide
+        if (cfgOptionBooleanDefault("greyBarIcons", FALSE))
+            {
+            hPrintf("<span title='Configure track' id='gear_%s' class='hgTracksGearIcon ui-icon ui-icon-gear' style='display: hide;'></span>", name);
+            }
+        hPrintf("</p>");
         }
     else
         hPrintf("width:%dpx;'></p>",slice->width);
     }
 }
 
 // FF does not support newline code and '...' looks bad without newlines
 #define NEWLINE_ENCODED " &#x0A;"
 #define NEWLINE_NOT_SUPPORTED " - "
 #define NEWLINE_TO_USE(browser) ((browser) == btFF ? NEWLINE_NOT_SUPPORTED : NEWLINE_ENCODED)
 #define ELLIPSIS_TO_USE(browser) ((browser) == btFF ? "" : "...")
 
 static void sliceAndMapDraw(struct imgBox *imgBox,struct imgTrack *imgTrack,
                             enum sliceType sliceType,char *name,boolean scrollHandle, struct jsonElement *ele)
 // writes a slice of an image and any assocated image map as HTML