Merge pull request #3570 from node-red/validate-tooltip-fix

Ensure node validation tooltip is closed when field becomes valid
This commit is contained in:
Nick O'Leary 2022-05-03 09:22:24 +01:00 committed by GitHub
commit 95b35be541
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 16 deletions

View File

@ -472,6 +472,7 @@ RED.popover = (function() {
action = newAction;
}
popover.delete = function() {
popover.close(true)
target.off("mouseenter");
target.off("mouseleave");
};

View File

@ -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) {
$("#"+prefix+"-"+property).on("change keyup paste", function(event) {
if (!$(this).attr("skipValidation")) {
validateNodeEditor(node,prefix);
}
});
} else {
$("#"+prefix+"-"+property).on("change", function(event) {
if (!$(this).attr("skipValidation")) {
validateNodeEditor(node,prefix);
}
});
}
}
/**