Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasting text adds a single space before and after the content #17480

Closed
MatzeKitt opened this issue Sep 19, 2019 · 3 comments
Closed

Pasting text adds a single space before and after the content #17480

MatzeKitt opened this issue Sep 19, 2019 · 3 comments
Labels
[Feature] Paste Needs Testing Needs further testing to be confirmed.

Comments

@MatzeKitt
Copy link
Contributor

Describe the bug
If you copy’n’paste text, the text will be surrounded by a single space.

To reproduce

  1. Mark text manually by dragging the cursor.
  2. Copy text from anywhere outside the editor.
  3. Create a new paragraph block.
  4. Press CTRL + V.

It doesn’t occur if you select text with a triple click.

Expected behavior
The text is inside the paragraph block as is.

Screenshots
gutenberg-spaces

The block on top of the selected block shows how it should be, the active block, how it actually displays the text.

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser Google Chrome
  • Version 76.0.3809.132
@swissspidy swissspidy added [Feature] Paste Needs Testing Needs further testing to be confirmed. labels Sep 20, 2019
@Computino
Copy link

Hi @KittMedia

I noticed the same problem and it's very annoying. I am on Windows 10 and it happens both with Firefox and Chrome.

I "solved" the problem by pasting using CTRL + SHIFT + V instead of CTRL + V

This is not a solution, of course, but I hope it helps you.

@jalefkowit
Copy link

I have the same problem when pasting text (on Ubuntu 19.04 + Firefox). I mostly paste text that I copy from LibreOffice Writer, so I've been wondering if it was something specific about copy/paste from LibreOffice that was causing the issue. Sounds like it may be a more generic thing. It is incredibly tedious to have to manually remove all the spaces from each individual pasted block by hand.

@Computino's Ctrl+Shift+V solution works in the sense that it doesn't result in the extra spaces being added, but it also means that things like formatting, hyperlinks, etc. in the original copied text get discarded. So instead of having to go manually tweak each block to remove extra spaces, I have to go manually tweak each block to add all its formatting back in. In most cases this is more work than removing the spaces would have been.

@ellatrix
Copy link
Member

ellatrix commented Dec 12, 2019

This should be fixed with #19043, and will be in Gutenberg 7.2. The issues is also a duplicate of #16172.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste Needs Testing Needs further testing to be confirmed.
Projects
None yet
Development

No branches or pull requests

5 participants