Deleting <blockquote> in Editor causes Preview Error: NotFoundError - Failed to execute 'removeChild'
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 201
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
First, thank you for developing this highly appreciated editor!
I tried to embed SNS quote cards such as Twitter (X), Instagram, and Bluesky using <blockquote> and then <script> in the editor. The preview was able to show these cards, but when I deleted the <blockquote> tag above the <script>, an error occurred.
NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
I think that when I delete the <blockquote> in the editor, it affects the DOM tree, but it does not update the Previewer's React tree accordingly.
It seems possible to address this with onChange in MDEditor, but I would like a more fundamental solution.
What is the best practice to avoid this error?
Contributor guide
No contributing guide indexed for this repository
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 embedding an SNS quote card with a blockquote and script, then deleting the blockquote above the script in the editor. Inspect how the preview DOM and React tree are updated during deletion; done means the preview no longer throws the NotFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100