[draft-js-emoji-plugin] Incorrect focus on paste of text containing emoji unicode
See original GitHub issueIf you paste text that has emoji unicode somewhere in the middle with no whitespace around it, the editor wrongly sets the focus to just after the last emoji in the pasted text.
This can be replicated on the official example page for the emoji plugin: https://www.draft-js-plugins.com/plugin/emoji
Try and paste this in the first example:
wefpokwpeofkpwoekfp👍wepfowk👍peofkwpoekfwe
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Emoji - DraftJS Plugins - High quality plugins with great UX
Emoji unicode characters are wrapped in a span, hidden, and displayed instead through a background image. This creates consistency across all platforms while ......
Read more >Mismatch in entityRanges with emoji as presiding text to ...
i am using mentions plugin it works awesome as expected without emojis/unicode. My situations. ex: "😀 dude Suresh Chandrababu" is my text ......
Read more >How to use the draft-js-emoji-plugin function in draft-js ... - Snyk
To help you get started, we've selected a few draft-js-emoji-plugin examples, based on popular ways it is used in public projects.
Read more >draft-js | Yarn - Package Manager
A React framework for building text editors. draftjs, editor, react, richtext ... Notable changes to Draft.js will be documented in this file.
Read more >Safari Technology Preview Release Notes - Apple Developer
Fixed Cross-Origin-Embedder-Policy incorrectly blocking scripts on a cache ... Fixed Emoji with variation selectors to be rendered in emoji style, not text ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@johnsenpeder I just ran into this issue. It is also a problem when programmatically initially focusing on mount when emojis pre-exist in the text. Your solution works. Any reason it shouldn’t be a PR? Pretty sure the current implementation is a bug.
@johnsenpeder thanks! I am now using
moveFocusToEnd
to solve it in theonChange
event