From b2f3d85e24c2c3b99c68b2453c40bb7cf48b50b4 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 3 Mar 2025 17:36:26 -0500 Subject: [PATCH] [Cleanup] Remove manual double click delay (#2840) --- src/extensions/core/widgetInputs.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/extensions/core/widgetInputs.ts b/src/extensions/core/widgetInputs.ts index c153a1fb1..366ec7939 100644 --- a/src/extensions/core/widgetInputs.ts +++ b/src/extensions/core/widgetInputs.ts @@ -866,7 +866,6 @@ app.registerExtension({ // Double click a widget input to automatically attach a primitive const origOnInputDblClick = nodeType.prototype.onInputDblClick - const ignoreDblClick = Symbol() nodeType.prototype.onInputDblClick = function ( this: LGraphNode, slot: number @@ -876,7 +875,7 @@ app.registerExtension({ : undefined const input = this.inputs[slot] - if (!input.widget || !input[ignoreDblClick]) { + if (!input.widget) { // Not a widget input or already handled input if ( !(input.type in ComfyWidgets) && @@ -903,12 +902,6 @@ app.registerExtension({ node.connect(0, this, slot) node.title = input.name - // Prevent adding duplicates due to triple clicking - input[ignoreDblClick] = true - setTimeout(() => { - delete input[ignoreDblClick] - }, 300) - return r } },