36b9de7c24cba2dfabb7fccb49abf496c5835e5c braney Thu Jun 25 08:57:23 2026 -0700 Fix single-click on ruler track to zoom regardless of the highlight-dialog setting, refs #27113 A single click on the base position ruler updated the displayed position text but did not zoom when the Enable highlight with drag-and-select option was on (the default). selectEnd computed the zoom window and wrote it to the position display, then called selectionEndDialog, which returns early on a single click (startTime null), so nothing navigated. The dialog branch never checked for a ruler click even though its comment said it should. Add that check so a ruler click always falls through to the zoom path. diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index e88593ba63d..112c388c5a5 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -2435,31 +2435,31 @@ } if (doIt) { // dragSelect.startTime is null if mouse has never been moved var singleClick = ( (selection.x2 === selection.x1) || dragSelect.startTime === null || (now.getTime() - dragSelect.startTime) < 100); var newPosition = genomePos.update(img, selection, singleClick); newPosition.replace("virt:", "multi:"); if (newPosition) { if (event.altKey) { // with the alt-key, only highlight the region, do not zoom dragSelect.highlightThisRegion(newPosition, true); $(imageV2.imgTbl).imgAreaSelect({hide:true}); } else { - if (hgTracks.enableHighlightingDialog && !(event.metaKey || event.ctrlKey)) + if (hgTracks.enableHighlightingDialog && !(event.metaKey || event.ctrlKey) && !rulerClicked) // don't show the dialog if: clicked on ruler, if dialog deactivated or meta/ctrl was pressed dragSelect.selectionEndDialog(newPosition); else { // in every other case, show the dialog $(imageV2.imgTbl).imgAreaSelect({hide:true}); if (imageV2.inPlaceUpdate) { if (hgTracks.virtualSingleChrom && (newPosition.search("multi:")===0)) { newPosition = genomePos.disguisePosition(newPosition); // DISGUISE } imageV2.navigateInPlace("db=" + getDb() + "&position=" + newPosition, null, true); } else { jQuery('body').css('cursor', 'wait'); document.TrackHeaderForm.submit(); } }