facebook / facebook/lexical

Bug: The first letter took different format when typing after selecting 2 different style text

Open
#5,105 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 16h
Merged PRs (30d)
61

Description

Lexical version:
v0.12.0

Steps To Reproduce

  1. Active bold button and type some bold text
  2. Inactive bold button and type some normal text
  3. Select all bold and normal text
  4. type new text

Link to code example:
https://playground.lexical.dev/

The current behavior

Only the first letter of new text get bold
chrome-capture-2023-9-10

The expected behavior

The first letter of the new text should have the same format as the other

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

Open the linked Lexical playground and reproduce the issue by entering bold and normal text, selecting both styles, and typing replacement text. Compare the formatting of the first character with the remaining characters; done means all newly typed text has consistent formatting.

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
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.