mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Ensure tooltip popover doesn't replace normal popover
This commit is contained in:
		| @@ -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", | ||||
|   | ||||
| @@ -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", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user