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-list] Bug Fix: retain selection styling when exiting nested list #7225

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

mrdivyansh
Copy link
Contributor

@mrdivyansh mrdivyansh commented Feb 21, 2025

Description

List item node loses selection style and format when exit nested list.

Test plan

Before

  • Go to Playground
  • Insert a new list
  • Change text style, i.e. font, color or formatting
  • Write a bullet point
  • Press Enter and Tab to start nested list
  • Write a text
  • Press enter twice to exit nested list
  • Write a text
  • [Bug] Expect the text losing styles and format
Screen.Recording.2025-02-21.at.10.46.17.PM.mov

After

Screen.Recording.2025-02-21.at.10.45.36.PM.mov

@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 Feb 21, 2025
Copy link

vercel bot commented Feb 21, 2025

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 Feb 21, 2025 5:18pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 5:18pm


await assertHTML(
page,
'<ul class="PlaygroundEditorTheme__ul"><li value="1" class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr" dir="ltr"><strong class="PlaygroundEditorTheme__textBold" style="color: rgb(208, 2, 27)" data-lexical-text="true">Hello</strong></li></ul><p class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr" dir="ltr"><strong class="PlaygroundEditorTheme__textBold" style="color: rgb(208, 2, 27)" data-lexical-text="true">World</strong></p>',
html`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have verified that the test fails without the PR changes.

Copy link
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, seems like a straightforward improvement!

@etrepum etrepum added this pull request to the merge queue Feb 22, 2025
Merged via the queue into facebook:main with commit a5c26cf Feb 22, 2025
46 checks passed
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. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants