Skip to content

[Bug]: DOM widgets on SubgraphNodes disappear permanently when zooming out past render threshold #4855

@christian-byrne

Description

@christian-byrne

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 all custom nodes disabled

What happened?

When DOM widgets are promoted to SubgraphNodes, they correctly hide when zooming out past the low quality threshold (0.6 zoom scale). However, when zooming back in closer than the threshold, the DOM elements remain hidden and never re-render.

The only way to make them visible again is to refresh the page or switch workflow tabs and switch back.

Steps to Reproduce

  1. Create a subgraph with a node that has a DOM widget (e.g., text input, combo box)
  2. Promote the widget to be visible on the SubgraphNode
  3. Zoom out past the render threshold (zoom scale < 0.6) - the DOM widget correctly disappears
  4. Zoom back in closer (zoom scale > 0.6) - the DOM widget does not reappear
  5. The widget remains invisible despite being within the render threshold

How is this affecting you?

Feature doesn't work as expected

ComfyUI Frontend Version

1.26.0

Browser

Chrome/Chromium

Console Errors

No console errors are generated when this issue occurs.

Additional Context

The issue appears to be in the DOM widget visibility update logic in DomWidgets.vue. The visibility check includes:

  • widget.isVisible() check
  • Graph containment check
  • !(widget.options.hideOnZoom && lowQuality) check

When zooming back in, the lowQuality flag is correctly updated to false (since scale > 0.6), but the DOM widget visibility state is not properly re-evaluated or the component is not re-rendered.

This specifically affects SubgraphNodes with promoted widgets because the visibility state management may differ from regular nodes. The updateWidgets function is called via onDrawForeground but the state update doesn't trigger a re-render of hidden widgets.

Technical details:

  • Low quality threshold: 0.6 (defined in LGraphCanvas)
  • DOM widgets use hideOnZoom option to control zoom visibility
  • The issue only affects promoted widgets on SubgraphNodes, not regular node widgets

┆Issue is synchronized with this Notion page by Unito

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions