You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WysiwygEditor throws when unmounted with a dialog open #57
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.
Activity
Keep editors from throwing when unmounted with a dialog open