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 content not deleted when double click content and paste it in firefox. #7081

Open
xjhxcc opened this issue Jan 23, 2025 · 1 comment

Comments

@xjhxcc
Copy link

xjhxcc commented Jan 23, 2025

Lexical version:
https://playground.lexical.dev

Steps To Reproduce

Image

when copy a text like 123, double click to select content XXX and paste it, then ui show pasted content and selection content like 123XXX

Image

Link to code example:

The current behavior

current behavior is rich content show pasted content and selection content

The expected behavior

expect ui only show pasted content, selection content should be deleted.

Impact of fix

only occurs in firefox, chrome and edge is normally.

@xjhxcc
Copy link
Author

xjhxcc commented Jan 23, 2025

The issue only occurs when selection content's format is inconsistent with the previous content and end with breakline.Please use below html to render into lexical and do test.
<span>ID:</span> <span style="color: rgb(0, 112, 192);">XXX</span><br />aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant