Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lexical][lexical-list] Bug Fix: Style lost on list insertion from empty paragraph #6925

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aleksandr-lapushkin
Copy link
Contributor

Description

This PR attempts to fix a scenario where attempting to replace an empty Paragraph with textStyle, which also changes the current selection, would cause the style to be lost.

Test plan

Before

  • Change font/color/size
  • Write something
  • Insert a new empty paragraph
  • Insert a list
  • Write some text
  • Style is lost
Screen.Recording.2024-12-09.at.15.28.20.mov

After

  • Change font/color/size
  • Write something
  • Insert a new empty paragraph
  • Insert a list
  • Write some text
  • Style is retained
Screen.Recording.2024-12-09.at.16.13.44.mov

Copy link

vercel bot commented Dec 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 2:15pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 2:15pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

size-limit report 📦

Path Size
lexical - cjs 31.11 KB (0%)
lexical - esm 30.98 KB (0%)
@lexical/rich-text - cjs 40.11 KB (0%)
@lexical/rich-text - esm 32.8 KB (0%)
@lexical/plain-text - cjs 38.68 KB (0%)
@lexical/plain-text - esm 30.11 KB (0%)
@lexical/react - cjs 42 KB (0%)
@lexical/react - esm 34.15 KB (0%)

@etrepum
Copy link
Collaborator

etrepum commented Dec 9, 2024

I think you should wait on #6912 for this one, the implementation approaches are conflicting and it may fix the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants