mdx-editor / mdx-editor/editor

[BUG] Image toolbar moves outside of editor if image url is invalid

Open
#607 1 comment 1 reaction 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

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • I have read the documentation and cannot find an answer.

Describe the bug
Image toolbar moves outside of the editor when image can't be loaded.
This is especially annoying if the editor covers the whole width of the page, because then most of the toolbar is not inside the window.

To Reproduce
Steps to reproduce the behavior:

  1. Open an editor instance with image plugin
  2. Insert image, use an invalid URL, e.g. /a.jpeg

Expected behavior
Image toolbar is fully contained within the editor.

Screenshots
Screenshot 2024-10-14 at 12 11 01

Editor covering full width of the page:
Screenshot 2024-10-14 at 12 11 30

Desktop (please complete the following information):

  • OS: any
  • Browser [e.g. Chrome, Safari]: Chrome

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

Reproduce this in an editor instance with the image plugin by inserting an image with an invalid URL such as /a.jpeg. Trace the image toolbar positioning behavior when the image cannot load, then verify that the toolbar remains fully contained within the editor, including when the editor spans the page width.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.