From fb0a134278a3349c16187040bad5e28c46704e68 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Fri, 7 Mar 2025 17:48:37 -0500 Subject: [PATCH] [Bug] Fix widget remove when node is deleted (#2918) --- src/scripts/domWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/domWidget.ts b/src/scripts/domWidget.ts index 7086f4201..09ae7ff45 100644 --- a/src/scripts/domWidget.ts +++ b/src/scripts/domWidget.ts @@ -360,7 +360,7 @@ LGraphNode.prototype.addDOMWidget = function < const onRemoved = this.onRemoved this.onRemoved = function (this: LGraphNode) { - element.remove() + widget.onRemove() elementWidgets.delete(this) onRemoved?.call(this) }