09c2b2e788c8cae028446ae7a948df6b1027eb56
chmalee
  Wed Aug 21 11:29:48 2024 -0700
Trying to simply update jquery-ui.js and jquery-ui.css to version 1.14.

diff --git src/hg/js/utils.js src/hg/js/utils.js
index b9f0241..6400488 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -3450,31 +3450,31 @@
             imageV2.markAsDirtyPage();
         }
     },
 
     sort: function (table)
     {   // Sets the table row order to match the order of the abbr attribute.
         // This is needed for back-button, and for visBox changes combined with refresh.
         var tbody = $(table).find('tbody')[0];
         if (!tbody)
             tbody = table;
 
         // Do we need to sort?
         var trs = tbody.rows;
         var needToSort = false;
         $(trs).each(function(ix) {
-            if ($(this).attr('abbr') !== $(this).attr('rowIndex').toString()) {
+            if (this.getAttribute('abbr') !== this.getAttribute('rowIndex')) {
                 needToSort = true;
                 return false;  // break for each() loops
             }
         });
         if (!needToSort)
             return false;
 
         // Create array of tr holders to sort
         var ary = [];
         $(trs).each(function(ix) {  // using sortTable found in utils.js
             ary.push(new sortTable.field(parseInt($(this).attr('abbr')),false,this));
         });
 
         // Sort the array
         ary.sort(sortTable.fieldCmp);
@@ -3833,30 +3833,31 @@
         console.log("trying to place a mouseover element next to an element that has not been created yet");
         throw new Error();
     }
 
     // obtain coordinates for placing the mouseover
     let refWidth, refHeight, refX, refY, y1;
     let refRight, refLeft, refTop, refBottom;
     let rect;
     let windowWidth = window.innerWidth;
     let windowHeight = window.innerHeight;
     if (refEl.coords !== undefined && refEl.coords.length > 0 && refEl.coords.split(",").length == 4) {
         // if we are dealing with an <area> element, the refEl width and height
         // are for the whole image and not for just the area, so
         // getBoundingClientRect() will return nothing, sad!
         let refImg = document.querySelector("[usemap='#" + refEl.parentNode.name + "']");
+        if (refImg === null) {return;}
         let refImgRect = refImg.getBoundingClientRect();
         let refImgWidth = refImgRect.width;
         let label = document.querySelector("[id^=td_side]");
         let btn = document.querySelector("[id^=td_btn]");
         let labelWidth = 0, btnWidth = 0;
         if (label && btn) {
             labelWidth = label.getBoundingClientRect().width;
             btnWidth = label.getBoundingClientRect().width;
         }
         let imgWidth = refImgWidth;
         if (refEl.parentNode.name !== "ideoMap") {
             imgWidth -= labelWidth - btnWidth;
         }
         let refImgOffsetY = refImgRect.y; // distance from start of image to top of viewport, includes any scroll;
         [x1,y1,x2,y2] = refEl.coords.split(",").map(x => parseInt(x));