020b8ffa0ab7d117e54c5e695d800318ba91d0b3
chmalee
  Wed Feb 25 10:25:18 2026 -0800
Fix ideogram range parsing when clicking on ideogram, refs #37115

diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index b4140a29829..ead861ccdc1 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -1610,38 +1610,39 @@
             if (loc.length === 4) {
                 var myLeft  = parseInt(loc[0]);
                 var myRight = parseInt(loc[2]);
                 if (chr.top === -1) {
                     chr.left   = myLeft;
                     chr.right  = myRight;
                     chr.top    = parseInt(loc[1]);
                     chr.bottom = parseInt(loc[3]);
                 } else {
                     if (chr.left  > myLeft)
                         chr.left  = myLeft;
                     if (chr.right < parseInt(loc[2]))
                         chr.right = parseInt(loc[2]);
                 }
 
-                var range = this.title.substr(this.title.lastIndexOf(':')+1);
+                let title = this.getAttribute("originalTitle") || this.getAttribute("title");
+                var range = title.substr(title.lastIndexOf(':')+1);
                 var pos = range.split('-');
                 if (pos.length === 2) {
                     if (chr.name.length === 0) {
                         chr.beg = parseInt(pos[0]);
                         //chr.end = parseInt(pos[1]);
-                        chr.name = this.title.substring(this.title.lastIndexOf(' ')+1,
-                                                        this.title.lastIndexOf(':'));
+                        chr.name = title.substring(title.lastIndexOf(' ')+1,
+                                                        title.lastIndexOf(':'));
                     } else {
                         if (chr.beg > parseInt(pos[0]))
                             chr.beg = parseInt(pos[0]);
                     }
                     if (chr.end < parseInt(pos[1])) {
                         chr.end = parseInt(pos[1]);
                         if (lastX === -1)
                             lastX = myRight;
                         else if (lastX > myRight)
                             chr.reverse = true;  // end is advancing, but X is not, so reverse
                     } else if (lastX !== -1 && lastX < myRight)
                         chr.reverse = true;      // end is not advancing, but X is, so reverse
 
                 }
                 $(this).css( 'cursor', 'text');