Skip to content

Fix color picker teardown on form rebuild#3584

Open
sjh9714 wants to merge 1 commit into
JannisX11:patchfrom
sjh9714:fix-colorpicker-spectrum-teardown
Open

Fix color picker teardown on form rebuild#3584
sjh9714 wants to merge 1 commit into
JannisX11:patchfrom
sjh9714:fix-colorpicker-spectrum-teardown

Conversation

@sjh9714

@sjh9714 sjh9714 commented May 26, 2026

Copy link
Copy Markdown

Fixes #3567.

This disposes rebuilt color picker form widgets so Spectrum can remove its generated .sp-container from the document body instead of leaving it behind on each form rebuild.

Changes:

  • Add ColorPicker.delete() to destroy the Spectrum instance before removing the widget.
  • Add form element disposal in InputForm rebuild/delete paths.
  • Dispose an existing dialog form before rebuilding or deleting a dialog.

Validation:

  • npm ci
  • npx tsc --project tsconfig.json --noEmit
  • npm run build-web
  • npm run build-electron
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant