AztecEditor-Android icon indicating copy to clipboard operation
AztecEditor-Android copied to clipboard

Copying preformatted text causes text to run off the page in previews

Open designsimply opened this issue 6 years ago • 2 comments
trafficstars

Steps to reproduce:

  1. Find some preformatted text (using <pre>) on the web and copy the content.
  2. Open the WPAndroid app.
  3. Go to Profile (Me) > App Settings > Use Block Editor and toggle it off.
  4. Create a new post.
  5. Paste in the content from step 1.
  6. Publish the post and view it from your device.

Sample content:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam elit erat, tincidunt posuere neque a, ultrices euismod quam. Sed at dui ex. Mauris vestibulum id dui eget maximus. Aenean bibendum nisi nec porttitor vehicula. In quis leo nec orci semper blandit. Aliquam erat volutpat. Nullam lobortis, ligula quis mollis posuere, enim nulla auctor nunc, eu sodales libero lacus sit amet dolor. Aenean vitae risus vel nisi auctor varius sit amet non nunc. Sed sollicitudin, quam vitae semper rhoncus, nunc magna condimentum dui, quis convallis lectus est ac massa.
Curabitur eu libero quam. Maecenas sed suscipit est. In pharetra dictum mi sed pharetra. Sed a cursus mauris. Proin convallis vehicula odio, non sagittis erat. Maecenas tortor augue, congue quis sodales in, ultrices et sem. Curabitur non enim id velit vestibulum hendrerit quis nec nisi. Sed sagittis eu tortor non imperdiet. Curabitur risus tortor, venenatis non suscipit in, lacinia ac velit. Pellentesque quis nisi ex. Phasellus sit amet ligula mauris.

Result: preformatted text copied into the Aztec editor keeps it's formatting and runs off the screen since the <pre> tag should not have any breaks in white space. This is a point of confusion for users who aren't aware that they are even copying the preformatted text that is using <pre> and likely aren't even aware of the HTML at all.

Screenshot_20190722-172715 Tested with WPAndroid alpha-181 (12.9 alpha) on Pixel 3 Android 9.

(internal reference: p4a5px-2pZ-p2) cc @charliescheer

designsimply avatar Jul 22 '19 23:07 designsimply

A user reported that words keep going off the page when they try to view posts using the app and it's because they're not aware that they are copying and pasting formatted content:

The words keep going off the page, I have attached a picture so you can see what I mean, you cant read the blog post on a phone, how do I fix this?

(internal reference: 2191094-zen) cc @charliescheer

designsimply avatar Jul 22 '19 23:07 designsimply

another example of this problem here 2237940-zen

in this case it wasn't just white-space: pre; but was other text formatting that cause the text to come in as the same color as the background of the site. The text styling for the site was overridden and it made the text invisible.

charliescheer avatar Aug 03 '19 21:08 charliescheer