mdx-editor / mdx-editor/editor
[BUG] image not clickable with stopPropagation on ancestor node in DOM
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
Reproduction
I set up a code sandbox to demonstrate the problem: https://codesandbox.io/p/sandbox/mdx-editor-base-forked-dld75x
To Reproduce
- Open Code Sandbox
- Click on image
Expected behavior
The resize box should appear. Instead it doesn't (due to stopPropagation on the parent div node). This is a real problem for having any dialog since one wants to prevent the click event to propagate outside the dialog.
I found an issue at lexical matching the problem (https://github.com/facebook/lexical/issues/3657) and also set up a new one (https://github.com/facebook/lexical/issues/5599). But I am not sure if together with mdxeditor the issue can or should also be solved here.
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
Start by reproducing the image-click failure in the linked CodeSandbox, then compare the behavior with the related Lexical issues 3657 and 5599. Determine whether the fix belongs in MDX Editor or upstream; done means an image opens its resize box even when an ancestor uses stopPropagation, without breaking dialog event isolation.
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
- 35/100