mdx-editor / mdx-editor/editor
[BUG][3.46.1] Link dialog reports `flushSync` error.
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
Tired with the latest v3.46.1.
now I can insert link into container elements.
but when the link dialog opens, i got error:
flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.
- if i edit/insert link in the main editor, there is no error when the link dialog pops up.
- but when i edit/insert link into some containers like Table, the error throws up.
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.
Research direction
Reproduce the issue by opening the link dialog while editing or inserting a link inside a Table or other container element, then compare it with the main editor. Trace the link-dialog opening path and the reported React flushSync lifecycle warning. Done means the dialog opens without the error in containers and still works in the main editor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100