960f3316822cfedb14efb0bca174788672d9d304 chmalee Tue May 7 09:02:06 2024 -0700 Make genoem autocomplete selections work after category label change, refs #33572 diff --git src/hg/js/hgGateway.js src/hg/js/hgGateway.js index e7cc4c2c11..1fcbfa1 100644 --- src/hg/js/hgGateway.js +++ src/hg/js/hgGateway.js @@ -1475,31 +1475,31 @@ clearPositionInput(); } highlightLabel('textEl_' + hubName, isAutocomplete); if (! isAutocomplete) { clearSpeciesInput(); } } function setDbFromAutocomplete(item) { // The user has selected a result from the species-search autocomplete. // It might be a taxId and/or db from dbDb, or it might be a hub db. var taxId = item.taxId || -1; var db = item.db; var org = item.org; - if (item.category === "GenArk") { + if (item.category.startsWith("UCSC GenArk")) { db = item.genome; setHubDb(item.hubUrl, taxId, db, "GenArk", item.scientificName, true); } else if (item.hubUrl) { // The autocomplete sends the hub database from hubPublic.dbList, // without the hub prefix -- restore the prefix here. db = item.hubName + '_' + item.db; setHubDb(item.hubUrl, taxId, db, item.hubName, org, true); } else { setTaxId(taxId, item.db, org, true, false); } } function onClickSpeciesLabel(taxId) { // When user clicks on a label, use that taxId (default db); // don't scroll to the label because if they clicked on it they can see it already;