mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +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() {
|
setTimeout(function() {
|
||||||
input.focus();
|
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);
|
}, 10);
|
||||||
|
|
||||||
return dialog;
|
return dialog;
|
||||||
|
|||||||
Reference in New Issue
Block a user