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/contacts.html src/hg/htdocs/contacts.html index 29167f55cdc..988b82d46d7 100755 --- src/hg/htdocs/contacts.html +++ src/hg/htdocs/contacts.html @@ -179,30 +179,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> </p> <p> When posting a question, please consider these points to ensure we can assist swiftly: