question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[draft-js-emoji-plugin] Incorrect focus on paste of text containing emoji unicode

See original GitHub issue

If 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:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sspreadcommented, Jan 18, 2020

@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.

1reaction
hero-guocommented, Jun 18, 2019

@johnsenpeder thanks! I am now using moveFocusToEnd to solve it in the onChange event

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found