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 spanning multiple lines does not replace highlighted text #12443

Closed
kriskarkoski opened this issue Nov 29, 2018 · 1 comment
Closed
Labels
[Feature] Paste [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended

Comments

@kriskarkoski
Copy link

Describe the bug
When highlighting text and pasting in multiple lines from an external program or Gutenberg to replace it, the existing text is not removed and the pasted content is added below it.

In the classic editor the existing text is replaced. Gutenberg does the same for single-line pastes or single-block pastes that span multiple lines both not for multiple lines from an external editor or multiple blocks in Gutenberg.

Gutenberg 4.5.1

To Reproduce
Steps to reproduce the behavior:

  1. Go to '/wp-admin/post-new.php' with Gutenberg enabled
  2. Add a line of text to a paragraph block
  3. Copy multi-line text from an external program (confirmed with Simplenote and Pages) or multiple Gutenberg blocks
  4. Highlight text
  5. Paste from clipboard and note the content is added below the existing text rather than replacing it.

Expected behavior
When highlighting text and pasting over it I expect the highlighted text to be removed and replaced.

Screenshots
gutenberg multi line paste

Desktop (please complete the following information):

  • OS: OS X 10
  • Browser Chrome
  • Version 70.0.3538.11

Additional context

  • Please add the version of Gutenberg you are using in the description.
  • To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.
@designsimply designsimply added [Feature] Paste Needs Testing Needs further testing to be confirmed. labels Nov 29, 2018
@designsimply
Copy link
Member

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

Closing to consolidate with #9218. Thanks @kriskarkoski!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants