facebook / lexical

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

Bug: LexicalClipboard pasting over mention crashes Chrome #5950

Closed danielbuechele closed 3 weeks ago

danielbuechele commented 3 weeks ago

Lexical version: 0.14.5

Steps To Reproduce

  1. Open Lexical Playground in Chrome and add an @-mention
  2. Copy some any text to your clipboard
  3. Create a selection that starts at the beginning of the @-mention (it can end within, at the end or after the mention)
  4. Now paste from clipboard

The current behavior

In most cases this crashes Chrome, in rare cases it only takes very long and produces a warning [Violation] 'paste' handler took 95275ms. This affects up-to-date Chrome on macOS and Windows. Safari on macOS is not affected.

In a case where Chrome wasn't entirely crashing I was able to take this performance trace (sorry, I only took a screenshot instead of exporting the trace)

image
ivailop7 commented 3 weeks ago

I reproduced. Wow!

thegreatercurve commented 3 weeks ago

Closed by #5956