dbc8dc013509561c1a9612491c0c84358c1db182 lrnassar Tue Sep 29 17:26:25 2026 -0700 Home page and contacts page search box did nothing when the text matched a position regex (chr1:1000000-1001000, BED-style, single base): searchBarClick only navigated in the non-position branch, after the hgSearch getChromName lookup. Now a position goes straight to hgTracks, as hgSearch.js already does. Broken since 258a0a679dd. refs #38449 diff --git src/hg/htdocs/index.html src/hg/htdocs/index.html index 85893396875..268af8f31c0 100755 --- src/hg/htdocs/index.html +++ src/hg/htdocs/index.html @@ -114,30 +114,32 @@ const params = new URLSearchParams(url.search); params.append("cjCmd", '{"getChromName": {"searchTerm": "' + term + '"}}'); if (positionMatch === null) { // user may have entered a full chromosome name, check for that asynchronosly: $.ajax({ type: "GET", url: "../cgi-bin/hgSearch", data: params.toString(), dataType: "json", trueSuccess: onSuccess, success: onSuccess, error: onFail, cache: true }); return false; + } else { + window.location.assign("../cgi-bin/hgTracks?position=" + term); } } } document.getElementById('searchBarSearchButton').addEventListener('click', searchBarClick); $('#searchBarSearchString').bind('keypress', function(e) { // binds listener to url field if (e.which === 13) { // listens for return key e.preventDefault(); // prevents return from also submitting whole form searchBarClick(); } }); </script> </span></div> <!-- Add tips message only for .ucsc Browser instances. To add a new tip, add a line to allTipsRaw.html in htdocs -->