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: Pasting emoji at the end clears editor (MaxLength) #2357

Closed
im-adithya opened this issue Jun 6, 2022 · 1 comment · Fixed by #2428
Closed

Bug: Pasting emoji at the end clears editor (MaxLength) #2357

im-adithya opened this issue Jun 6, 2022 · 1 comment · Fixed by #2428
Assignees

Comments

@im-adithya
Copy link
Contributor

#2296 (comment)

lexical-.4.mp4

Lexical version: Latest

Steps To Reproduce

  1. Type any random 30 characters
  2. Copy this emoji 💏 or any other emoji of length 2 (occupying a length of 2, otherwise this emoji is actually of length 11 as shown by '💏'.length which also can be an error if lexical is supposed to treat this as an 11-length emoji, but a....a💏 (28 as) works fine in MaxLength)
  3. Remove a character and paste the emoji at the end (and ONLY at the end, otherwise the behavior is proper)

The current behavior

The entire editor gets cleared and the Block Format dropdown disappears! (I've found out that it is because the blockType of editor gets changed to root after being cleared)

The expected behavior

It shouldn't allow the emoji

Note

I would like to work on this after getting to know a bit more about emoji guidelines as that would help in a better understanding of the functionality!

@trueadm trueadm self-assigned this Jun 15, 2022
@trueadm
Copy link
Collaborator

trueadm commented Jun 15, 2022

Fixed in #2428.

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

Successfully merging a pull request may close this issue.

2 participants