Comfy-Org / litegraph.js

A graph node engine and editor written in Javascript similar to PD or UDK Blueprints, comes with its own editor in HTML5 Canvas2D. The engine can run client side or server side using Node. It allows to export graphs as JSONs to be included in applications independently.
MIT License
52 stars 12 forks source link

Close prompt dialog popup on outer canvas click #80

Closed christian-byrne closed 2 months ago

christian-byrne commented 2 months ago

Close prompt dialogs by clicking elsewhere on canvas, consistent with how the litegraph context menus work. Currrently you have to click the OK button. Escape/Enter also work, but not if the element loses focus.

Resolves an issue on touch devices in which the OK button is rendered offscreen and the dialog is seemingly impossible to dismiss.

Touch device:

https://github.com/user-attachments/assets/4851a5ea-bf55-4a40-b38f-42eb70781553

Chrome and Firefox:

https://github.com/user-attachments/assets/dc6472e0-774e-4ab2-8972-c24830e8e21c

Related: