facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
20.05k stars 1.71k forks source link

Bug: Multiple line selection awaraness in collaboration is not displayed correctly #4457

Open TehAwol opened 1 year ago

TehAwol commented 1 year ago

Lexical version: v0.10.0 (latest)

Steps To Reproduce

  1. Copy paste some text from a lorem ipsum generator (Plain text paste works as expected)
  2. Make a selection across multiple lines

Link to code example: Reproducible on playground

Screenshot 2023-05-05 at 08 50 00

The current behavior

Multiple line selection presence is only shown on the initial and last line. Lines in between are not highlighted at all except a tiny slit at the end of the line.

The expected behavior

All lines should be highlighted the same as the initial and the last line.

fantactuka commented 1 year ago

Which browser/OS did you use. Works well on Mac/Chrome:

Screenshot 2023-05-05 at 7 30 21 PM
TehAwol commented 1 year ago

Have had same issue on Brave (Chromium) and Firefox. Seems to be intimately linked with copying and pasting several paragraphs.

Image below of behaviour on Firefox image

fantactuka commented 1 year ago

Can you do a recording?

TehAwol commented 1 year ago

With text copied and pasted directly from a lorem ipsum generator.

https://user-images.githubusercontent.com/56039404/236800788-f2bcf336-65a2-427a-97f8-0adeab68c81c.mov

hamza512b commented 9 months ago

The issue is happening if the text has justify format. I am working on a fix https://github.com/facebook/lexical/pull/5657

https://github.com/facebook/lexical/assets/63897375/09a60c66-032c-46c1-9dbe-47f590f96653

I was recording in chromiom based browser. In firefox it is not working too. In webkit it does work as I far as I tested.