e6a7d9a7a4652ed62ef66c1df82e5962dc74c18f braney Tue Jun 30 14:58:14 2026 -0700 Fix shift+drag on ruler to show the zoom/highlight dialog again, refs #27113 Commit 36b9de7c24c made a single click on the ruler always zoom by adding "&& !rulerClicked" to the dialog-gating condition in selectEnd. But rulerClicked only means the gesture started in the ruler band, not that it was a click, so it also routed ruler shift+drags straight to zoom instead of opening the dialog. Gate on "!(rulerClicked && singleClick)" so only a genuine single click on the ruler skips the dialog; a drag-select on the ruler shows it as before. diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 72bfbc005fa..515f0ada286 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -2435,32 +2435,32 @@ } 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) && !rulerClicked) - // don't show the dialog if: clicked on ruler, if dialog deactivated or meta/ctrl was pressed + if (hgTracks.enableHighlightingDialog && !(event.metaKey || event.ctrlKey) && !(rulerClicked && singleClick)) + // don't show the dialog if: single-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(); } } }