mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 22:59:14 +00:00
Clock prompt dialog input on canvas click (#80)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user