Skip to content

WysiwygEditor throws when unmounted with a dialog open #57

Closed

Description

@n4ff4h

WysiwygEditor throws if it unmounts while one of its dialogs is open:

TypeError: Cannot read properties of null (reading 'commands')
  at afterDialog (src/editor/wysiwyg-editor.tsx)

Radix's close-focus timer calls afterDialog after the editor has been destroyed. BlockEditor has the same afterDialog pattern and probably does the same; that isn't tested.

A test hit this in 0.2.0 and was fixed by closing the dialog first, so the component still has the bug. An app can hit it by navigating away with a dialog open.

Fix: guard afterDialog against a missing or destroyed editor in both components, with a test that unmounts with a dialog open.

🤖 Generated with Claude Code

Activity

  1. added a commit that references this issue on Nov 2, 2026
    a1a7ad9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions