From abe87830cdea58d4e00adf1ed00e31de59e02786 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Mon, 22 Jan 2018 17:51:04 +0000 Subject: [PATCH] Operation tooltips now disappear if you hover over them while dragging an opertion. --- src/web/OperationsWaiter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/web/OperationsWaiter.js b/src/web/OperationsWaiter.js index adc2be6d..48bbe158 100755 --- a/src/web/OperationsWaiter.js +++ b/src/web/OperationsWaiter.js @@ -167,7 +167,8 @@ OperationsWaiter.prototype.opListCreate = function(e) { OperationsWaiter.prototype.enableOpsListPopovers = function(el) { $(el).find("[data-toggle=popover]").addBack("[data-toggle=popover]") .popover({trigger: "manual"}) - .on("mouseenter", function() { + .on("mouseenter", function(e) { + if (e.buttons > 0) return; // Mouse button held down - likely dragging an opertion const _this = this; $(this).popover("show"); $(".popover").on("mouseleave", function () { @@ -178,7 +179,7 @@ OperationsWaiter.prototype.enableOpsListPopovers = function(el) { setTimeout(function() { // Determine if the popover associated with this element is being hovered over if ($(_this).data("bs.popover") && - !$(_this).data("bs.popover").$tip.is(":hover")) { + ($(_this).data("bs.popover").$tip && !$(_this).data("bs.popover").$tip.is(":hover"))) { $(_this).popover("hide"); } }, 50);