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

Deleting Plaintext Emoji as First Character Throws Error #2632

Closed
ragurney opened this issue Mar 6, 2019 · 1 comment · Fixed by #3044
Closed

Deleting Plaintext Emoji as First Character Throws Error #2632

ragurney opened this issue Mar 6, 2019 · 1 comment · Fixed by #3044
Labels

Comments

@ragurney
Copy link
Contributor

ragurney commented Mar 6, 2019

bug

What's the current behavior?

Inserting an emoji in plain text -- either by using insertText(), copy pasting, or using Mac's emoji picker -- as the first character in the editor, then hitting the left arrow once and hitting backspace results in an error: slate.js:6451 Uncaught TypeError: Cannot read property 'text' of null
Sandbox example:

https://codesandbox.io/s/8zyqw2jy38

This also happens in the Slate.js example editor:

What's the expected behavior?

Allow the backspace, resulting in the replacement character (�). I'd be happy to open a PR if this is indeed a bug.

Thanks!

@brendancarney
Copy link
Collaborator

Looks like a bug to me. We'd definitely welcome a PR!

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

Successfully merging a pull request may close this issue.

2 participants