mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-16 08:58:30 +01:00
Operation tooltips now disappear if you hover over them while dragging an opertion.
This commit is contained in:
parent
7490651a06
commit
abe87830cd
1 changed files with 3 additions and 2 deletions
|
@ -167,7 +167,8 @@ OperationsWaiter.prototype.opListCreate = function(e) {
|
||||||
OperationsWaiter.prototype.enableOpsListPopovers = function(el) {
|
OperationsWaiter.prototype.enableOpsListPopovers = function(el) {
|
||||||
$(el).find("[data-toggle=popover]").addBack("[data-toggle=popover]")
|
$(el).find("[data-toggle=popover]").addBack("[data-toggle=popover]")
|
||||||
.popover({trigger: "manual"})
|
.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;
|
const _this = this;
|
||||||
$(this).popover("show");
|
$(this).popover("show");
|
||||||
$(".popover").on("mouseleave", function () {
|
$(".popover").on("mouseleave", function () {
|
||||||
|
@ -178,7 +179,7 @@ OperationsWaiter.prototype.enableOpsListPopovers = function(el) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// Determine if the popover associated with this element is being hovered over
|
// Determine if the popover associated with this element is being hovered over
|
||||||
if ($(_this).data("bs.popover") &&
|
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");
|
$(_this).popover("hide");
|
||||||
}
|
}
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
Loading…
Reference in a new issue