Comfy-Org / Comfy-Org/ComfyUI_frontend
Width calculation of custom widgets and dom widgets in liteGraph nodes suddenly become fixed.
- 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 custom nodes enabled
### What happened?
A picture describes it best. Those are 3 different nodes, from 3 different packages. You can notice the nodes are different widths. The custom and DOM widgets in them are all the same width regardless though. If the node is wide, the widgets are too short. If the node is narrow, they widgets overflow out of it.
If I click to another workflow and back again, it's fixed, it draws correctly, I can resize the nodes, everything performs as expected, but if I otherwise interact with the node by clicking an input, or I try to move the node, it jumps back to that exact same fixed width.
### Steps to Reproduce
Use a custom node with a custom widget or DOM widget, drag the node, change the node size.
### How is this affecting you?
Crashes ComfyUI completely
### ComfyUI Frontend Version
1.43.18
### Browser
Chrome/Chromium
### Console Errors
```javascript
```
### Logs
```shell
```
### Additional Context
_No response_
Contributor guide
Research direction
Start by reproducing the issue in Chrome/Chromium with a custom node containing a custom or DOM widget, then compare its width after resizing, dragging, clicking an input, and switching workflows. Trace the widget width calculation during those interactions and verify that widgets follow their node width without overflowing or becoming fixed; confirm the reproduction no longer crashes ComfyUI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100