[Bug]: DOM widget width halved when right side panel is open
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start by reading updateWidgets in DomWidgets.vue at line 88 and tracing the canvas sizing through LGraphCanvas.ts:5155. Reproduce with the right panel open, compare the canvas width attribute with getBoundingClientRect().width, and verify that DOM widgets fill the node width with the panel both open and closed.
Written by the indexing model from the issue text.
Description
[Bug]: DOM widget width halved when right side panel is open
Prerequisites
- I am running the latest version of ComfyUI
- I have searched existing issues to make sure this isn't a duplicate
- I have tested with custom nodes disabled where applicable
What happened?
Custom nodes that use DOM widgets (HTML-based UI rather than native LiteGraph widgets) render at approximately half their correct width when the right side panel is open. The widget appears correctly sized on initial load, but after clicking the node to select it, DomWidgets.vue's updateWidgets sets the widget width to ~460px instead of the correct ~960px.
Workaround: Closing the right side panel before working with DOM widget nodes restores correct behaviour.
Steps to reproduce
- Open the right side panel (click any node so the Parameters/Info/Settings panel appears on the right)
- Add any custom node that uses a DOM widget (e.g.
one-node-flux-2-klein) - Click the node to select it
- The widget content is constrained to approximately half the node's width
Expected behaviour
The DOM widget should fill the full width of the node regardless of whether the right side panel is open or closed.
Actual behaviour
The DOM widget is rendered at approximately half the node's width (~460px instead of ~960px) when the right side panel is open.
Root cause (identified via DevTools)
The canvas <canvas> element has a width attribute of 960px (correct), but its getBoundingClientRect().width returns 480px because the canvas is physically displayed at 50% of its logical size due to the right panel consuming screen space.
updateWidgets in DomWidgets.vue appears to use the canvas element's width attribute (960px) rather than its rendered screen width (480px) when calculating widget position/size, causing a 2× mismatch. With the right panel closed, both values match and everything works correctly.
Console evidence:
canvas element width attribute: 960
canvas getBoundingClientRect().width: 480 ← half, due to right panel
widget width set to: 460px ← should be ~960px
Call stack at time of incorrect width assignment
updateWidgets DomWidgets.vue:88
useChainCallback useChainCallback.ts:22
drawFrontCanvas LGraphCanvas.ts:5155
drawFrontCanvas use_everywhere.js:177
draw LGraphCanvas.ts:5034
renderFrame LGraphCanvas.ts:2150
(Async: FrameRequestCallback)
Additional context
- Affects all custom nodes using DOM widgets, not just a specific node
- Reproduces on both the ComfyUI Desktop app and the portable Windows version
- Frontend version 1.33.0 and older does not exhibit this bug — it was introduced somewhere after that.
Environment
| ComfyUI frontend version | 1.45.15 |
| ComfyUI Desktop version | 0.25.1 |
| Operating system | Windows |
| GPU | NVIDIA |
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 706
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 554
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Comfy-Org/ComfyUI_frontend
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Comfy-Org/ComfyUI_frontend#18216 · 1 reaction ·
-
dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Comfy-Org/ComfyUI_frontend#18212 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Comfy-Org/ComfyUI_frontend#18189 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Comfy-Org/ComfyUI_frontend#18026 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Comfy-Org/ComfyUI_frontend#17601 ·
All issues in Comfy-Org/ComfyUI_frontend
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100