mdx-editor / mdx-editor/editor

[BUG] image not clickable with stopPropagation on ancestor node in DOM

Open
#357 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  1. Open Code Sandbox
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.