f5f4c748361b9244ad682ea3955fa34ae553917c max Thu Jul 6 10:15:04 2023 -0700 slow down ct trash disposal, refs #31504 diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index c47c731..ff200cf 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -3486,31 +3486,33 @@ hgTracks.highlight = ""; var cartSettings = {'highlight': ""}; cart.setVarsObj(cartSettings); imageV2.drawHighlights(); } } function onTrackDelIconClick (ev) { /* delete custom track if user clicks its trash icon */ // https://genome.ucsc.edu/cgi-bin/hgCustom?hgsid=1645697744_i0Yp2Di71NytSDdb6r0vUbupIvKO&hgct_do_delete=delete&hgct_del_ct_UserTrack_3545=on var divEl = ev.target.closest("div"); // must use .closest(), as user can click on either the SVG or the DIV space. var trackName = divEl.getAttribute("data-track"); var hgsid = getHgsid(); var url = 'hgCustom?hgsid='+hgsid+'&hgct_do_delete=delete&hgct_del_'+trackName+'=on'; xhttp = new XMLHttpRequest(); - xhttp.open("GET", url); + // this cannot be asyncronous, as users can click quickly here and the hgCustom calls above cannot run in parallel + // since we store custom tracks as a text file, not mysql tables + xhttp.open("GET", url, false); xhttp.send(); divEl.closest("td").remove(); } ////////////////////////////////// //// popup (aka modal dialog) //// ////////////////////////////////// var popUp = { trackName: "", trackDescriptionOnly: false, saveAllVars: null, cleanup: function ()