fix: Restrict double click action to the title area.

https://github.com/ltdrdata/ComfyUI-Manager/issues/370
This commit is contained in:
Dr.Lt.Data
2024-01-28 14:31:14 +09:00
parent 048f44f105
commit b1f613e649
3 changed files with 4 additions and 4 deletions

View File

@@ -146,10 +146,10 @@ app.registerExtension({
async nodeCreated(node, app) {
let orig_dblClick = node.onDblClick;
node.onDblClick = () => {
node.onDblClick = function (e, pos, self) {
orig_dblClick?.apply?.(this, arguments);
if(!node.inputs && !node.outputs)
if((!node.inputs && !node.outputs) || pos[1] > 0)
return;
switch(double_click_policy) {