Gutenberg: Selecting all text in a paragraph and pasting from elsewhere doesn't replace the text

Created on 22 Aug 2018  路  4Comments  路  Source: WordPress/gutenberg

Describe the bug
Selecting all of the text in a paragraph block and then pasting content from Google Docs results in the pasted content being appended rather than the pasted content replacing the paragraph block.

To Reproduce

  1. Copy text into your clipboard from a Google Docs document
  2. Add a new post
  3. Type in some text to create a paragraph block
  4. Press Cmd+A to select all of the text in the block
  5. Press Cmd+V to paste the copied content
  6. The pasted content appears _after_ the paragraph block

Expected behavior
The pasted content should _replace_ the paragraph block.

Screenshots
google-docs

Desktop:

  • OS: macOS 10.13.6
  • Browser: Latest Chrome & Safari
[Feature] Raw Handling [Type] Bug

All 4 comments

I tested with current master @ c446d069f and found that the problem only happens when the paste from a docs.google.com document is multiline as noted by @kriskarkoski in #12443.

Tested with WordPress 4.9.8 and Gutenberg 4.5.1 master @ c446d069f using Chrome 70.0.3538.110 and Firefox 63.0.3 on macOS 10.13.6.

@designsimply Should we update the title to be more broad like the closed issue? I experienced it with Simplenote and Pages, so it's not limited to just Google Docs.

Tested with copying text from Lorem Ipsum website and had the same issue where it's didn't replace the selected blocks but pasted the blocks (paragraph blocks) below the selected blocks.

Wordpress Version: 5.2.3
Browser: Chrome Version 77.0.3865.90 (Official Build) (64-bit)

Looks like this works now!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maddisondesigns picture maddisondesigns  路  79Comments

tofumatt picture tofumatt  路  86Comments

afercia picture afercia  路  78Comments

smp303 picture smp303  路  98Comments

mtias picture mtias  路  83Comments