mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Ensure node validation tooltip is closed when field becomes valid
This commit is contained in:
		| @@ -472,6 +472,7 @@ RED.popover = (function() { | ||||
|                 action = newAction; | ||||
|             } | ||||
|             popover.delete = function() { | ||||
|                 popover.close(true) | ||||
|                 target.off("mouseenter"); | ||||
|                 target.off("mouseleave"); | ||||
|             }; | ||||
|   | ||||
| @@ -421,20 +421,11 @@ RED.editor = (function() { | ||||
|      * @param prefix - the prefix to use in the input element ids (node-input|node-config-input) | ||||
|      */ | ||||
|     function attachPropertyChangeHandler(node,definition,property,prefix) { | ||||
|         var input = $("#"+prefix+"-"+property); | ||||
|         if (definition !== undefined && "format" in definition[property] && definition[property].format !== "" && input[0].nodeName === "DIV") { | ||||
|             $("#"+prefix+"-"+property).on('change keyup', function(event) { | ||||
|                 if (!$(this).attr("skipValidation")) { | ||||
|                     validateNodeEditor(node,prefix); | ||||
|                 } | ||||
|             }); | ||||
|         } else { | ||||
|             $("#"+prefix+"-"+property).on("change", function(event) { | ||||
|                 if (!$(this).attr("skipValidation")) { | ||||
|                     validateNodeEditor(node,prefix); | ||||
|                 } | ||||
|             }); | ||||
|         } | ||||
|         $("#"+prefix+"-"+property).on("change keyup paste", function(event) { | ||||
|             if (!$(this).attr("skipValidation")) { | ||||
|                 validateNodeEditor(node,prefix); | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
| @@ -1066,7 +1057,7 @@ RED.editor = (function() { | ||||
|                     nodeEditPanes.push('editor-tab-description'); | ||||
|                     removeInfoEditorOnClose = true; | ||||
|                     if(node.infoEditor) { | ||||
|                         //As 'editor-tab-description' adds `node.infoEditor` store original & set a  | ||||
|                         //As 'editor-tab-description' adds `node.infoEditor` store original & set a | ||||
|                         //flag to NOT remove this property | ||||
|                         node.infoEditor__orig = node.infoEditor; | ||||
|                         delete node.infoEditor; | ||||
| @@ -1975,7 +1966,7 @@ RED.editor = (function() { | ||||
|                 if (source === "node" && thing.id) { | ||||
|                     id = thing.id; | ||||
|                 } else if (selection.nodes && selection.nodes.length) { | ||||
|                     id = selection.nodes[0].id;   | ||||
|                     id = selection.nodes[0].id; | ||||
|                 } else { | ||||
|                     return false; //cant obtain Id. | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user