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

Drop Cap causes text wrapping issues for images slightly smaller than viewing screen #15459

Open
thehenrybyrd opened this issue May 6, 2019 · 4 comments
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended

Comments

@thehenrybyrd
Copy link

thehenrybyrd commented May 6, 2019

With an Image block that has been made smaller and right-aligned, it’s possible to add a Paragraph block to the left, imitating the Media & Text block. Text from the Paragraph then wraps around the Image.
However, this can really screw up drop caps if the image ratio matches the screen size poorly. This was brought up in a user interaction, where the text doesn't wrap properly (or rather the text does but the drop cap doesn't) when viewing the post from certain mobile devices.

To reproduce:

  1. Create a new post using Gutenberg, or use an existing post.
  2. Add an Image block, and resize the image so it’s about half the width or less of a normal block. For best results, make the image slightly less wide than the screen of your mobile device (or one you'll check in inspect element). I made this image 344x281 px and viewed it via inspect element with the Pixel 2 profile, 411x&731.
  3. Right-align the Image block.
  4. Click below the Image block, in an attempt to add a new block.
  5. See a new Paragraph block appear to the left of the small Image block. Add some text, and use a Drop Cap.

Here’s what that looks like:

imageblock

The text wraps around the image nicely in desktop web browser:

Screen Shot 2019-05-06 at 3 41 22 PM

However, when viewed in mobile, if the image is just a bit smaller than the viewing screen, the text wraps but the drop cap remains below the image:

Screen Shot 2019-05-06 at 4 38 21 PM

Reproduced on both WordPress.com and a vanilla WordPress install using WordPress 5.1.1.

@gziolo gziolo added [Type] Bug An existing feature does not function as intended [Block] Paragraph Affects the Paragraph Block labels May 23, 2019
@gziolo
Copy link
Member

gziolo commented May 23, 2019

Related issues: #12468, #12298, #10832.

@gwwar
Copy link
Contributor

gwwar commented Mar 4, 2021

Edit: Still seeing this. It is a little tricky to trigger without activating devtools.

dropcap.mp4

@paaljoachim
Copy link
Contributor

Here is another variant.

Dropcap-movies-below-image-left-on-smaller-screens.mp4

@Anuj-Rathore24
Copy link

Hey @thehenrybyrd

This issue has been resolved, and we can close it!
Reference PR - #12177

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

5 participants