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

Bug: Selection formatting/styling is lost when you indent a list #6476

Closed
gigantedocil opened this issue Jul 30, 2024 · 6 comments · Fixed by #6912 or #6970
Closed

Bug: Selection formatting/styling is lost when you indent a list #6476

gigantedocil opened this issue Jul 30, 2024 · 6 comments · Fixed by #6912 or #6970

Comments

@gigantedocil
Copy link

If you create a list item with some style, press enter to create a new item at the same level and then press tab you lose the formatting on the selection.

Lexical version: latest

Steps To Reproduce

  1. Create a list that has some styling, for example bold:

image

  1. Press enter to create a new list item of the same level (bold styling remains on selection.

image

  1. Press tab to indent the list item (bold styling disappears).

image

Link to code example:

Can easily be reproduced on the playground.

The current behavior

Selection formatting is lost after indenting a list item.

The expected behavior

Selection formatting is not lost after indenting a list item.

Impact of fix

Currently an important bug on my app is caused by this.

@citruscai
Copy link
Contributor

i will work on this 😎

@gigantedocil
Copy link
Author

@citruscai, awesome, thanks! Were you able to reproduce it?

@citruscai
Copy link
Contributor

@citruscai, awesome, thanks! Were you able to reproduce it?

yes! i was able to reproduce it in the playground and saw the issue. i also reproduced it in google docs and google docs does keep the original format after you indent a list item. so i am happy that i found an issue and excited to tackle it 😄

@citruscai
Copy link
Contributor

@citruscai, awesome, thanks! Were you able to reproduce it?

@gigantedocil yes! i was able to reproduce it in the playground and saw the issue. i also reproduced it in google docs and google docs does keep the original format after you indent a list item. so i am happy that i found an issue and excited to tackle it 😄

@gigantedocil
Copy link
Author

@citruscai, amazing work! Thanks!

@citruscai
Copy link
Contributor

@gigantedocil hi!! did this fix the issue in your project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment