Skip to content

Commit e5b2772

Browse files
committed
Switch back to non-comfyUI removeWidget to fix power primitive textarea sticking even when not a string type.
1 parent 22afa45 commit e5b2772

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "rgthree-comfy"
33
description = "Making ComfyUI more comfortable."
4-
version = "1.0.2508180854"
4+
version = "1.0.2508182334"
55
license = { file = "LICENSE" }
66
dependencies = []
77

src_web/comfyui/base_node.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@ export abstract class RgthreeBaseNode extends LGraphNode {
197197

198198
// Comfy added their own removeWidget, but it's not fully rolled out to stable, so keep our
199199
// original implementation.
200-
// TODO: Can be simplified eventually.
201-
if (typeof super.removeWidget === 'function') {
200+
// TODO: Actually, scratch that. The ComfyUI impl doesn't call widtget.onRemove?.() and so
201+
// we shouldn't switch to it yet. See: https://github.com/Comfy-Org/ComfyUI_frontend/issues/5090
202+
const canUseComfyUIRemoveWidget = false;
203+
if (canUseComfyUIRemoveWidget && typeof super.removeWidget === 'function') {
202204
super.removeWidget(widget as IBaseWidget);
203205
} else {
204206
const index = this.widgets.indexOf(widget as IWidget);

web/comfyui/base_node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ export class RgthreeBaseNode extends LGraphNode {
101101
}
102102
if (!widget)
103103
return;
104-
if (typeof super.removeWidget === 'function') {
104+
const canUseComfyUIRemoveWidget = false;
105+
if (canUseComfyUIRemoveWidget && typeof super.removeWidget === 'function') {
105106
super.removeWidget(widget);
106107
}
107108
else {

0 commit comments

Comments
 (0)