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 with an indented unordered list is amazingly buggy #10303

Closed
danielbachhuber opened this issue Oct 3, 2018 · 10 comments
Closed

Pasting with an indented unordered list is amazingly buggy #10303

danielbachhuber opened this issue Oct 3, 2018 · 10 comments
Labels
[Block] List Affects the List Block [Feature] Paste [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended

Comments

@danielbachhuber
Copy link
Member

See GIF for multiple behavioral issues:

buggyindentedlist

Desktop:

  • OS: Mac 10.13.6
  • Browser: FF Quantum
  • Version: 62.0.2
@danielbachhuber danielbachhuber added [Type] Bug An existing feature does not function as intended [Feature] Paste labels Oct 3, 2018
@mtias
Copy link
Member

mtias commented Oct 3, 2018

See #6555 and #5727

@danielbachhuber danielbachhuber added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label Oct 3, 2018
@mtias
Copy link
Member

mtias commented Oct 3, 2018

cc @mcsf we should consolidate these, have actionable tasks, and close all the different duplicates.

@mcsf
Copy link
Contributor

mcsf commented Oct 3, 2018

The issues you mention are actionable, @mtias.

@danielbachhuber, not sure what time you have, but taking your report and clearly identifying its issues would be very helpful.

@danielbachhuber
Copy link
Member Author

taking your report and clearly identifying its issues would be very helpful.

I don't have the bandwidth this week to track down the specific technical defects. The GIF I shared seems fairly obvious though.

@chrisvanpatten
Copy link
Contributor

@danielbachhuber I could try to look into this a bit; but out of curiosity what was your paste source? Were you pasting from within Gutenberg?

@danielbachhuber
Copy link
Member Author

what was your paste source? Were you pasting from within Gutenberg?

A GitHub Gist.

@chrisvanpatten
Copy link
Contributor

chrisvanpatten commented Oct 5, 2018

Okay so the issues particularly seem from pasting an ordered list into another ordered list but only if you paste into an indented level.

Test case:

  1. Copy the list from this rendered markdown: https://gist.github.com/chrisvanpatten/069aeaeca2a6de74c83ee9743e9a1dc4
  2. Note that your cursor is at the start of the text (Pasting should bring you to end of content, not beginning #5317)
  3. Place your cursor at the end of the final list item ("Another note")
  4. Paste again
  5. Note that everything is mangled.

@chrisvanpatten chrisvanpatten changed the title Pasting with an intended unordered list is amazingly buggy Pasting with an indented unordered list is amazingly buggy Oct 5, 2018
@chrisvanpatten
Copy link
Contributor

chrisvanpatten commented Oct 5, 2018

@danielbachhuber Hope you don't mind, fixed a typo in your issue title :)

EDIT: Also here's the console log for the first and second pastes, with each console log line in its own code block for clarity.

First paste

index.js:295 Received HTML:

 <meta charset='utf-8'><ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px !important; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><li style="box-sizing: border-box;"><strong style="box-sizing: border-box; font-weight: 600;">Expose blah blah blah</strong><ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px;"><li style="box-sizing: border-box;"><a href="https://google.com/" rel="nofollow" style="box-sizing: border-box; background-color: transparent; color: rgb(3, 102, 214); text-decoration: none;">https://google.com/</a></li><li style="box-sizing: border-box; margin-top: 0.25em;">Note about this</li></ul></li><li style="box-sizing: border-box; margin-top: 0.25em;"><strong style="box-sizing: border-box; font-weight: 600;">Do another thing</strong><ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px;"><li style="box-sizing: border-box;"><a href="https://yahoo.com/" rel="nofollow" style="box-sizing: border-box; background-color: transparent; color: rgb(3, 102, 214); text-decoration: none;">https://yahoo.com/</a></li><li style="box-sizing: border-box; margin-top: 0.25em;">Another note</li></ul></li></ul>
index.js:296 Received plain text:

 Expose blah blah blah
https://google.com/
Note about this
Do another thing
https://yahoo.com/
Another note
index.js:176 Processed HTML piece:

 <ul><li><strong>Expose blah blah blah</strong><ul><li><a href="https://google.com/">https://google.com/</a></li><li>Note about this</li></ul></li><li><strong>Do another thing</strong><ul><li><a href="https://yahoo.com/">https://yahoo.com/</a></li><li>Another note</li></ul></li></ul>

Second paste

index.js:295 Received HTML:

 <meta charset='utf-8'><ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px !important; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><li style="box-sizing: border-box;"><strong style="box-sizing: border-box; font-weight: 600;">Expose blah blah blah</strong><ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px;"><li style="box-sizing: border-box;"><a href="https://google.com/" rel="nofollow" style="box-sizing: border-box; background-color: transparent; color: rgb(3, 102, 214); text-decoration: none;">https://google.com/</a></li><li style="box-sizing: border-box; margin-top: 0.25em;">Note about this</li></ul></li><li style="box-sizing: border-box; margin-top: 0.25em;"><strong style="box-sizing: border-box; font-weight: 600;">Do another thing</strong><ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px;"><li style="box-sizing: border-box;"><a href="https://yahoo.com/" rel="nofollow" style="box-sizing: border-box; background-color: transparent; color: rgb(3, 102, 214); text-decoration: none;">https://yahoo.com/</a></li><li style="box-sizing: border-box; margin-top: 0.25em;">Another note</li></ul></li></ul>
index.js:296 Received plain text:

 Expose blah blah blah
https://google.com/
Note about this
Do another thing
https://yahoo.com/
Another note
index.js:52 Processed inline HTML:

 <strong>Expose blah blah blah</strong><a href="https://google.com/">https://google.com/</a><br>Note about this<br><strong>Do another thing</strong><a href="https://yahoo.com/">https://yahoo.com/</a><br>Another note

@ellatrix ellatrix added the [Block] List Affects the List Block label Oct 16, 2018
@danielbachhuber danielbachhuber added this to the WordPress 5.0 milestone Oct 31, 2018
@ellatrix
Copy link
Member

ellatrix commented Nov 6, 2018

A lot of these issues have been resolved in the last two weeks. Any remaining issues should to be reported separately with clear steps to reproduce. If the original issue is still present, it also needs more information (ideally change the title/description).

@ellatrix ellatrix closed this as completed Nov 6, 2018
@danielbachhuber
Copy link
Member Author

@iseulde Works a lot better on master now, thanks!

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] Paste [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants