Clock prompt dialog input on canvas click (#80)

This commit is contained in:
bymyself
2024-08-21 08:47:00 -07:00
committed by GitHub
parent 86d9391807
commit f351b1d87a

View File

@@ -11432,6 +11432,15 @@ LGraphNode.prototype.executeAction = function(action)
setTimeout(function() {
input.focus();
function handleOutsideClick(e) {
if (e.target === canvas) {
dialog.close();
canvas.parentNode.removeEventListener("click", handleOutsideClick);
canvas.parentNode.removeEventListener("touchend", handleOutsideClick);
}
}
canvas.parentNode.addEventListener("click", handleOutsideClick);
canvas.parentNode.addEventListener("touchend", handleOutsideClick);
}, 10);
return dialog;