0c4f83cacbb6b3489d039e3207f39d1b54fb4591
chmalee
  Mon Nov 4 13:52:20 2024 -0800
Fix hgTracks track search tabs, the 'select' method has been deprecated so we weren't setting up dropdownchecklists when switching tabs, refs #34759

diff --git src/hg/js/utils.js src/hg/js/utils.js
index 46df8a0..0f4f1ae 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -3429,50 +3429,51 @@
                 if (element)
                     $(element).attr('id','isLike' + rowNum);
                 element = $(this).find("td[id^='hgt_mdbVal']")[0];
                 if (element)
                     $(element).attr('id','hgt_mdbVal' + rowNum);
             });
 
             return mdbSelectRows.length;
         }
         return 0;
     },
 
     switchTabs: function (ui)
     {   // switching tabs on findTracks page
 
-        if (ui.panel.id === 'simpleTab' && $('div#found').length < 1) {
+        id = ui.newPanel[0].id;
+        if (id === 'simpleTab' && $('div#found').length < 1) {
             // delay necessary, since select event not afterSelect event
             setTimeout(function() { 
                             $('input#simpleSearch').focus(); 
                         },20); 
-        } else if (ui.panel.id === 'advancedTab') {
+        } else if (id === 'advancedTab') {
             // Advanced tab has DDCL wigets which were sized badly because the hidden width
             // was unknown delay necessary, since select event not afterSelect event
             setTimeout(function() { 
                             ddcl.reinit($('div#advancedTab').find('select.filterBy'),false); 
                         },20);
         }
         if ($('div#filesFound').length === 1) {
-            if (ui.panel.id === 'filesTab')
+            if (id === 'filesTab')
                 $('div#filesFound').show();
             else
                 $('div#filesFound').hide();
         }
         if ($('div#found').length === 1) {
-            if (ui.panel.id !== 'filesTab')
+            if (id !== 'filesTab')
                 $('div#found').show();
             else
                 $('div#found').hide();
         }
     }
 };
 
 function escapeJQuerySelectorChars(str)
 {   // replace characters which are reserved in jQuery selectors
     // (surprisingly jQuery does not have a built in function to do this).
     return str.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~"])/g,'\\$1');
 }
 
 var preloadImages = [];
 var preloadImageCount = 0;