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 into a list block copied from a paragraph block is broken #34262

Closed
2 tasks done
ashfame opened this issue Aug 24, 2021 · 4 comments
Closed
2 tasks done

Pasting text into a list block copied from a paragraph block is broken #34262

ashfame opened this issue Aug 24, 2021 · 4 comments
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended

Comments

@ashfame
Copy link
Member

ashfame commented Aug 24, 2021

Description

Hi, Tested this on a fresh WordPress install with no plugins.

Any text that you copy from a paragraph block or a heading block, it probably copies some meta data along with it, which when pasted in a list item of a list block, prevents the paste operation from working. Nothing happens. Works fine if pasting in paragraph block or heading block.

In browser console, I do see logs Received HTML: Ash and Received plain text: Ash though.

Step-by-step reproduction instructions

  • Create a new post. In first paragraph, enter text like "Howdy Ash".
  • Hit enter and now switch to a list block (I used markdown parsing functionality to switch to a list by typing a hyphen and hitting Tab key)
  • Copy "Ash" from the first block and try to paste in the first list item.
  • Nothing happens.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress version: 5.8 (fresh install)
  • No plugins (Reproducible with and without Gutenberg plugin activated)

Pre-checks

  • I have searched the existing issues.
  • I have tested with all plugins deactivated except Gutenberg.
@stacimc stacimc added [Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended labels Aug 25, 2021
@mupic
Copy link

mupic commented Sep 3, 2021

Inserting text also does not work in a quote block.

@westnz
Copy link

westnz commented Sep 7, 2021

I was able to reproduce this. Nothing happened when I tried to paste 'text' into a list block copied from a paragraph block.

@yansern
Copy link
Contributor

yansern commented Oct 18, 2021

I'm not familiar with Copy & Paste operations so this might be completely wrong. A quick investigation into use-paste-handler.js shows that the create() function returns plain text, ignoring the multilineWrapperTags param.

image

Will be digging into why multilineWrapperTags param is ignored next.

@ellatrix
Copy link
Member

The list block has been completely rewritten in #42711. I tested this an the issues seems to be resolved. Feel free to reopen if it's not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

6 participants