Gutenberg: Undo pastes the copied text

Created on 7 Nov 2018  路  3Comments  路  Source: WordPress/gutenberg

Describe the bug
I copied a text and pasted it on a paragraph block, hit Return and clicked command+z; the text pasted twice;

To Reproduce
Steps to reproduce the behavior:

  1. Copy a text
  2. Paste it on a paragraph block
  3. Hit Return
  4. Hit Command+Z / Ctrl+Z

Expected behavior
Should delete the new paragraph block created.

Screenshots
unknown behavious

Desktop (please complete the following information):

  • OS: macOS
  • Browser Google Chrome
  • Version 70.0.3538.77
[Feature] History [Feature] Raw Handling [Feature] Rich Text [Status] Duplicate [Type] Bug

All 3 comments

Noticed the same behavior a short while ago in https://github.com/WordPress/gutenberg/issues/6516#issuecomment-433920438.

Seems to me it happens also witn an already existing paragraph. Just make sure to:

  • put the caret _at the beginning_ of the paragraph
  • press Enter
  • a new paragraph is created _before_ the existing one (I guess Gutenberg considers the previous one as "deleted"?)
  • press Command+Z / Ctrl+Z: the previous paragraph re-appears

Closing as a duplicate of #8882. @GutenDev I think a fix for #8882 will cover this case as well, but please let me know if you feel otherwise!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasmussen picture jasmussen  路  173Comments

mapk picture mapk  路  84Comments

maddisondesigns picture maddisondesigns  路  79Comments

afercia picture afercia  路  73Comments

melchoyce picture melchoyce  路  169Comments