profile
viewpoint

Ask questionsIssue with updated https://draftjs.org/ demo editor

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

The draftjs.org website was recently updated. The new demo editor on the site has a bug with pasting.

Steps to reproduce:

  1. Go to https://draftjs.org/
  2. Copy and then paste something like "test" into the editor at the bottom of the page
  3. Type the left arrow once so the cursor should be before the final "t". E.g. "tes|t" (note do not click, the bug is shown when you use keyboard navigation).
  4. Paste again.

The paste will incorrectly be placed at the end of the "test", not at the cursor's location. The results will be "testtest" rather than "testestt".

The old demo editor behaved correctly and did not have this issue.

Running this on the latest version of Chrome.

facebook/draft-js

Answer questions fabiomcosta

@angelikatyborska I can get the broken behavior on Chrome as well sometimes...

useful!

Related questions

Decorators are not working as expected hot 1
TypeError: null is not an object (evaluating 'n.nodeType') in editOnInput.js hot 1
Error using it with @types/draft-js: setImmediate is not a function hot 1
Multiple spaces in a text are not rendered correctly / do not wrap line hot 1
Is it possible to truncate the editor content ? hot 1
Using SSR with Next.js: TypeError: undefined is not an object (evaluating 'editorState.getBlockTree(anchorBlockKey).getIn') hot 1
Conflict with Grammarly chrome extension hot 1
How to set block data? hot 1
How to stop DraftJS cursor jumping to beginning of text? hot 1
Android Web has Known Issues [Compilation of other issues] hot 1
Problem with SSR frameworks (e.g. Gatsby) hot 1
Uncaught TypeError: Cannot read property 'isInCompositionMode' of undefined hot 1
How to remove an entity? hot 1
Feature request to expose Draft.css for JavaScript only users (CSS-in-JS) hot 1
Editor does not scroll when typing on an indented line hot 1
Github User Rank List