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

List block: Sometimes pasting into a list is ignored #32468

Closed
bobbingwide opened this issue Jun 4, 2021 · 7 comments
Closed

List block: Sometimes pasting into a list is ignored #32468

bobbingwide opened this issue Jun 4, 2021 · 7 comments
Labels
[Feature] Paste Needs Testing Needs further testing to be confirmed.

Comments

@bobbingwide
Copy link
Contributor

bobbingwide commented Jun 4, 2021

Description

Sometimes, pasting content into a list results in no content being pasted.

Please see the video

Step-by-step reproduction instructions

  1. Create a list block
  2. Copy some stuff from another page ( eg. a GitHub issue )
  3. Attempt to paste into the list block
  4. Sometimes it works, sometimes it doesn't

Expected behaviour

Content should be pasted everytime.

Actual behaviour

Sometimes the content doesn't appear to be pasted.

Screenshots or screen recording (optional)

Enable sound to hear me describe my steps.
https://user-images.githubusercontent.com/2474435/120866550-1694b280-c588-11eb-932d-028e6ba102cf.mp4

Code snippet (optional)

WordPress information

  • WordPress version: 5.7.2
  • Gutenberg version: 10.7.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: Windows 10
  • Browser: Chrome
@bobbingwide
Copy link
Contributor Author

This may be relevant
Uncaught Type error: Cannot read property 'length' of undefined.

image

@talldan talldan added [Feature] Paste Needs Testing Needs further testing to be confirmed. labels Jun 9, 2021
@johngodley
Copy link
Contributor

I'm also seeing this, although it seems to trigger every time. I think it might be fixed by #32527

@colorful-tones
Copy link
Member

I just hit this bug. I hope #32527 fixes it 🤞

@talldan
Copy link
Contributor

talldan commented Jun 14, 2021

The description in #32590 might help with reproducing. It seems to happen whenever pasting into a new list item, but as soon as text is entered pasting works ok.

@mrfoxtalbot
Copy link

I have noticed a very similar issue that is affecting the quote block.

With the plugin active (10.8), it will not be possible to add new paragraphs into a quote block. This was reported originally here Automattic/wp-calypso#53591

@colorful-tones, do you think that #32527 will also fix this in the case of quote blocks, or was it just for list blocks? Thank you!

@talldan
Copy link
Contributor

talldan commented Jun 22, 2021

#32839 reports that the same issue happens in the paragraph block after using shift+enter to add a line break.

When testing I saw the same error message:

Uncaught TypeError: Cannot read property 'length' of undefined
    at addActiveFormats (utils.js:8)
    at HTMLParagraphElement._onPaste (use-paste-handler.js:190)

@talldan
Copy link
Contributor

talldan commented Jun 22, 2021

Looks like this was fixed yesterday by #32527

@talldan talldan closed this as completed Jun 22, 2021
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