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

Cut and paste list item into another list item fails #32980

Closed
pansamolot opened this issue Jun 25, 2021 · 8 comments
Closed

Cut and paste list item into another list item fails #32980

pansamolot opened this issue Jun 25, 2021 · 8 comments
Labels
[Block] List Affects the List Block [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended

Comments

@pansamolot
Copy link

Quite very similar to #32467 but has different results.

Description

Copying and pasting a list item into another empty list item fails. Both pressing Ctrl+V and selecting Paste from context menu gives no effects. Pasting the very same copied element into a paragraph or into new empty non-list block works just fine.

Step-by-step reproduction instructions

  1. Select any list item in the block editor (either from ordered or unordered list), select entire line
  2. Hit Enter once in the same line to create a new empty list item
  3. Move cursor to that new line / new list item
  4. Paste copied text

one

To compare:

  1. Select any list item in the block editor (either from ordered or unordered list), select entire line
  2. Hit Enter twice in the same line to end current list and create new empty block (paragraph)
  3. Move cursor to that new line
  4. Paste copied text

two

Expected behaviour

Text is correctly copied in both scenarios.

Actual behaviour

Text is correctly copied only in second (compare) scenario. In first (base) scenario pasting brings no effect.

WordPress information

  • WordPress version: 5.7.2
  • Gutenberg version: Version 10.9.0 | By Gutenberg Team
  • Are all plugins except Gutenberg deactivated? No
  • Are you using a default theme (e.g. Twenty Twenty-One)? No

Device information

  • Device: PC
  • Operating system: Windows 10 10094
  • Browser: Chrome Version 91.0.4472.114
@skorasaurus
Copy link
Member

Hi,

Thanks for reporting. I think this may have been fixed just a couple days ago with #32527

I downloaded the nightly version of gutenberg, released on a daily basis that includes all published changes and I am unable to reproduce the that you described in your first scenario. It pasted as expected.

If you download the newest Gutenberg nightly from https://gutenbergtimes.com/need-a-zip-from-master/#nightly ; do you have the same issue?

@skorasaurus skorasaurus added [Block] List Affects the List Block [Type] Bug An existing feature does not function as intended [Status] Needs More Info Follow-up required in order to be actionable. labels Jun 25, 2021
@pansamolot
Copy link
Author

Hi @skorasaurus,

Thanks for a feedback. Sorry, but I don't have any kind of dev-like environment to test nighties from Gutenberg or any other plugins. Must wait for the official release instead in order to confirm.

If you cannot reproduce this bug in nightly, which I was able to reproduce using official then most likely you're right that this bug has been fixed. Thank you.

@skorasaurus
Copy link
Member

I understand, thanks for your prompt response : ) That fix definitely will be included in Gutenberg 11.0 and may even be backported to a 10.9 release.

Please reopen if you are still experiencing this in 11.0.

@pansamolot
Copy link
Author

Just to update / clarify. Both #32467 and my description above may incorrectly suggest that there is a problem with pasting list item into list item only.

I can now confirm that this is not true. There's a general problem with pasting anything (any type of block) into list item. In my case Gutenberg failed to paste both preformatted block of text, link and generally anything except for a unformatted text.

@skorasaurus
Copy link
Member

skorasaurus commented Jun 30, 2021

Thanks for the clarity, I'm able to confirm this @pansamolot

This is being tracked at #33078

@pansamolot
Copy link
Author

@skorasaurus Isn't newly created #33078 and old #32467 a duplicates? Or at list one of them being a substitute of another? Or am I missing something?

@skorasaurus
Copy link
Member

As I understand; they're extremely similar and the tickets somewhat overlap but 2 expected behaviors/workflows are not :

#33078 is text copied from a paragraph block cannot be pasted as an item in a list block; nothing is pasted when pasted action is done (right click and select paste)
#32467 is text copied from a list block, in certain conditions (as outlined in the issue), will create an invalid block when pasted.

@pansamolot
Copy link
Author

Well... my assumption (and a question here) was, because I have somewhat a mixture of both above.

In my case nothing can be pasted into a list block (or actually: a list item inside list block) in certain scenarios. I tried pasting:

  • content from another list item (animations above),
  • content from a simple block (paragraph block)
  • content from outside Wordpress (some rich or plain text)

But, OK, that was just for a clarifications. Let's keep current ticket closed and let's wait for the resolution for the two mentioned by you above (either fix + merge or closure). And, ultimately, let's wait for a public release of a Gutenberg version having fixes to these and similar fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants