-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 - Pasting Multiline Text - Strange behavior #9476
Comments
Tested and confirmed using WordPress 4.9.8 and Gutenberg 3.7. I think it would be a nice enhancement to remove leading and trailing white space from pasted content within list items, but it would also be good to see what developers working on the project think about that as well. |
Related: #5727 |
Thank you for testing Gutenberg at this stage and for reporting the issue! I am closing this one in favor of #10042 because it has a bit more information and also notes a problem with undo which could be relevant. Both issues are good but I want to keep just one of them open! |
@designsimply should this issue be reopened? I'm still able to reproduce this issue on the Gutenberg version included with WordPress 5.0.2, but #10042 is now closed as a duplicate of #8882 which no longer mentions the problem that occurs pasting multiline text on a List Block. |
@designsimply I am having the same problem - Mojave, 5.0.3. |
This issue and the related issue #10042 have both been closed. The problem still exist. It has not been fixed. @codebykat | @designsimply | Can you please re-open this issue? Thank you! |
I tried to reproduce this since folks are pinging me on it for whatever reason (🤷♀) and I'm not getting the empty list blocks before and after, though it does replace the selected list block with a paragraph block. I'm not sure if that's the intended behavior -- it would seemingly be better to have it paste into a list block and assume newlines delimit new list items. I'll defer to @designsimply or someone else on the Gutenberg team as to whether this should be re-opened as an enhancement. |
Re-opening for another review and feedback from Gutenberg developers. I tested and confirmed I can see the exact same behavior showing in @dionysous's gif when I tested using a site running WordPress 5.2.1 and no active plugins. For reference, I tested with Firefox 67.0 on macOS 10.14.5. This issue doesn't seem like a duplicate of #8882 to me. @codebykat I suspect you got a mention since you were the author of the #10042 issue. |
I can confirm @designsimply - I've tested it again on my Mac using Safari 12.1.2, Chrome 76.0.3 and Firefox 68.0.2: Screen capture when pasting the text into a list block: |
Hi @dionysous! Thanks for the report. Could you share what the console is logging for you when you paste? I'm looking for this: Please copy the text and paste it in between backticks:
Thank you! |
I'm able to reproduce this on Gutenberg 9.5.2, Firefox 83, Ubuntu. Pasting from a plain text editor (sublime text), each line of text is its own line:
and in the console:
|
Also reproducable in WordPress 5.6.1, Twenty Twenty 1.6, no plugins, Firefox 85.0.2 (64-Bit). Console:
|
Describe the bug
Pasting multiline text from clipboard into list element creates two empty list blocks and a paragraph block in between.
To Reproduce
Then I go to the Gutenberg Editor > Add new Block > Add List Block
I insert the text into the first list element in that block. Instead of being inside the first list element, which is expected from other editors, you get an empty list block, then one paragraph block with the pasted text and under that an empty list block again:
Expected behavior
When pasting the text into the first list element, the text should be in that list element, not in an paragraph block:
Desktop used:
Additional context
The text was updated successfully, but these errors were encountered: