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

RichText paste breaks with multiple pastes #32526

Closed
glendaviesnz opened this issue Jun 9, 2021 · 4 comments · Fixed by #32527
Closed

RichText paste breaks with multiple pastes #32526

glendaviesnz opened this issue Jun 9, 2021 · 4 comments · Fixed by #32527
Assignees
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@glendaviesnz
Copy link
Contributor

glendaviesnz commented Jun 9, 2021

Description

When trying to paste into a rich text block like Paragraph, if multiple pastes are done in a row, or sometimes when content is deleted and new content pasted, a console error is thrown and the content of second paste does not appear in the editor.

Step-by-step reproduction instructions

  • In the editor try and paste some text into a paragraph block, and then paste the same text again
  • The text does not appear in the editor and a console error is thrown

Screenshots or screen recording (optional)

paste-2-before

WordPress information

  • WordPress version: 5.7.2
  • Gutenberg version: latest trunk
  • Are all plugins except Gutenberg deactivated? Yes

Device information

  • Device: Desktop
  • Operating system: OSX
  • Browser: Chrome 91
@glendaviesnz glendaviesnz added [Type] Bug An existing feature does not function as intended [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Jun 9, 2021
@glendaviesnz glendaviesnz self-assigned this Jun 9, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 9, 2021
@glendaviesnz glendaviesnz changed the title RichText paste is broken RichText paste breaks with multiple pastes Jun 9, 2021
@KokkieH
Copy link

KokkieH commented Jun 15, 2021

@glendaviesnz On WordPress.com's end we've had a report of this via Twitter that mentions pasting with AppleScript also doesn't work. Do you think it might be the same issue, or something different? I'm afraid testing this is beyond my skillset - no idea how AppleScript works :D

@WunderBart
Copy link
Member

Howdy! 👋 This seems to be partially fixed. Testing with #32527 cherry-picked, I can only paste plain text into a new list item, but cannot paste if the text was copied from any other block. Here are the steps to reproduce the issue I'm seeing:

  • Write something in a paragraph block
  • Select & copy what you just wrote
  • Hit enter and create a list block
  • Paste & see that nothing got pasted and no error is being thrown in the JS console
  • Now copy some other text, not from the editor canvas this time - can be the current page's URL
  • Paste and see that it's all good.

Seems to me that the List block is not accepting content from other blocks? Would that be the case here? Here's a recording of those steps:

Screen.Recording.2021-06-29.at.17.58.16.mov

Should we reopen this issue or create another one, @glendaviesnz? cc @fullofcaffeine @ockham

@ockham
Copy link
Contributor

ockham commented Jun 29, 2021

Should we reopen this issue or create another one [...]?

Let's create a new one -- the issue you found seems a bit different from what's described in this issue's original description 🙂

@fullofcaffeine
Copy link
Member

Should we reopen this issue or create another one [...]?

Let's create a new one -- the issue you found seems a bit different from what's described in this issue's original description slightly_smiling_face

Created the issue here: #33078.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants