Comfy-Org / Comfy-Org/ComfyUI_frontend

When link from subgraph input is disconnected from a node, onConnectionsChange is not called

Open
#5,673 1 comment 0 reactions 0 assignees View on GitHub
area:subgraph Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

### Prerequisites

- [x] I am running the latest version of ComfyUI
- [x] I have searched existing issues to make sure this isn't a duplicate
- [x] I have tested with all custom nodes disabled ([see how](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled))

### What happened?

When I disconnect the input of a node, onConnectionsChange is called.

If the link was from the input panel of a subgraph, it is not called.

### Steps to Reproduce

1. Make a connection from the input of a subgraph to a node within the subgraph
2. Place a breakpoint on the node's onConnectionsChange method
3. Disconnect

### How is this affecting you?

Minor inconvenience

### ComfyUI Frontend Version

1.26.13

### Browser

Chrome/Chromium

### Console Errors

```javascript

```

### Logs

```shell

```

### Additional Context

In LGraphNode.ts, lines 3076...

```js
if (link_info.origin_id === -10 && 'inputNode' in graph) {
graph.inputNode._disconnectNodeInput(this, input, link_info)
return true
}
```
returns before the onConnectionsChange call at line 3111

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-5673-When-link-from-subgraph-input-is-disconnected-from-a-node-onConnectionsChange-is-not--2746d73d3650819b88b4dba976257a4a) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.