microsoft / microsoft/roosterjs

Selecting an image moves the surrounding text

Open
#3,070 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
190
Avg merge
1d 8h
Merged PRs (30d)
16

Description

Describe the bug
Selecting an image on the same line as a paragraph of text moves the surrounding text (line height/spacing changes)

To Reproduce
Steps to reproduce the behavior:

  1. Open a Rooster editor (for example the demo page)
  2. Add a paragraph of text
  3. At the end of the paragraph, insert a small image
  4. Select the image by clicking on it

Expected behavior
The image should be selected and the text remain unchanged

Actual behavior
The image is selected but the spacing of the surrounding text changes

Screenshots

https://github.com/user-attachments/assets/f94306b5-8af5-444b-ba97-33d83dbfdff1

Device Information

  • OS: Windows
  • Browser: Edge
  • Version: 137.0.3296.68

Additional context
N/A

Contributor guide

No contributing guide indexed for this repository

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 issue in a Rooster editor, such as the demo page, using the listed steps in Edge. Inspect the image-selection behavior and surrounding paragraph layout. Done means selecting a small inline image leaves the surrounding text spacing and line height unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.