1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Ensure tooltip popover doesn't replace normal popover

This commit is contained in:
Nick O'Leary 2019-05-28 13:25:03 +01:00
parent d583c68de5
commit b1b4b3fb63
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 14 additions and 4 deletions

View File

@ -52,6 +52,11 @@ RED.popover = (function() {
var openPopup = function(instant) {
if (active) {
var existingPopover = target.data("red-ui-popover");
if (options.tooltip && existingPopover) {
active = false;
return;
}
div = $('<div class="red-ui-popover"></div>');
if (size !== "default") {
div.addClass("red-ui-popover-size-"+size);
@ -122,7 +127,10 @@ RED.popover = (function() {
}
}
div.addClass('red-ui-popover-'+d).css({top: top, left: left});
if (existingPopover) {
existingPopover.close(true);
}
target.data("red-ui-popover",res)
if (instant) {
div.show();
} else {
@ -142,6 +150,7 @@ RED.popover = (function() {
});
}
div = null;
target.removeData("red-ui-popover",res)
}
}
}
@ -236,6 +245,7 @@ RED.popover = (function() {
}
}
return RED.popover.create({
tooltip: true,
target:target,
trigger: "hover",
size: "small",

View File

@ -139,9 +139,9 @@
"clearLog": "Clear log",
"filterLog": "Filter log",
"openWindow": "Open in new window",
"copyPath": "copy Path",
"copyPayload": "copy Value",
"pinPath": "pin open"
"copyPath": "Copy path",
"copyPayload": "Copy value",
"pinPath": "Pin open"
},
"messageMenu": {
"collapseAll": "Collapse all paths",