3d3f084876b33513ffa9047d3129c71f628b6ebc
chmalee
  Wed Mar 13 16:29:59 2024 -0700
Show hgc details pages in a dialog on hgTracks. Currently under hg.conf
control , refs #33216

diff --git src/hg/js/jquery.contextmenu.js src/hg/js/jquery.contextmenu.js
index ce4aee9..6d62579 100644
--- src/hg/js/jquery.contextmenu.js
+++ src/hg/js/jquery.contextmenu.js
@@ -194,31 +194,33 @@
 			}
 		},
 		
 		// A hook to call before the menu is shown, in case special processing needs to be done.
 		// Return false to cancel the default show operation
 		beforeShow: function() { return true; },
 		
 		// Show the context menu
 		show: function(t,e) {
 			var cmenu=this, x=e.pageX, y=e.pageY;
 
             // prevent tooltips from showing up while contextmenu is open
             if (typeof showMouseovers !== 'undefined' && showMouseovers) {
                 console.log("right click open, disabling mouseovers");
                 clearTimeout(mouseoverTimer);
+                if (mousemoveController) {
                     mousemoveController.abort();
+                }
                 hideMouseoverText(mouseoverContainer);
                 canShowNewMouseover = false;
             }
 
 			cmenu.target = t; // Preserve the object that triggered this context menu so menu item click methods can see it
 			if (cmenu.beforeShow(e)!==false) {
 				// If the menu content is a function, call it to populate the menu each time it is displayed
 				if (cmenu.menuFunction) {
 					if (cmenu.menu) { $(cmenu.menu).remove(); }
 					cmenu.menu = cmenu.createMenu(cmenu.menuFunction(cmenu,t),cmenu);
 					cmenu.menu.css({display:'none'});
 					$(cmenu.appendTo).append(cmenu.menu);
 				}
 				var $c = cmenu.menu;
 				x+=cmenu.offsetX; y+=cmenu.offsetY;
@@ -262,30 +264,29 @@
                         }
 			return {'x':x,'y':y};
 		},
 		
 		// Hide the menu, of course
 		hide: function() {
 			var cmenu=this;
 			if (cmenu.shown) {
 				if (cmenu.iframe) { $(cmenu.iframe).hide(); }
 				if (cmenu.menu) { cmenu.menu[cmenu.hideTransition](cmenu.hideSpeed,((cmenu.hideCallback)?function(){cmenu.hideCallback.call(cmenu);}:null)); }
 				if (cmenu.shadow) { cmenu.shadowObj[cmenu.hideTransition](cmenu.hideSpeed); }
 			}
 			cmenu.shown = false;
             // re-enable tooltips on contextmenu close
             if (typeof showMouseovers !== 'undefined' && showMouseovers) {
-                console.log("contextmenu close, re-enabling tooltips");
                 canShowNewMouseover = true;
             }
 		}
 	};
 	
 	// This actually adds the .contextMenu() function to the jQuery namespace
 	$.fn.contextMenu = function(menu,options) {
 		var cmenu = $.contextMenu.create(menu,options);
 		this.each(function(){
 			$(this).bind('contextmenu',function(e){cmenu.show(this,e);return false;});
 		});
 		return cmenu;
 	};
 })(jQuery);