PDF Embed: improve the squished layout on iOS mobile browser view
Follow-up (non-blocker) to https://github.com/Automattic/jetpack/pull/15454
CC @jeherve
Steps to reproduce the issue
- Embed a PDF file into a post, publish
- View the post on iPhone or iPad
What I expected
I expected to see a link or URL only, like other mobile devices.
What happened instead
It appears that iOS (well, Mobile Safari) attempts to display the object — but the 800 pixel height throws off the display a bit.
Screenshots
Suggested change
Open to suggestions. One idea is to provide a different height value such as auto for this case.
Closed https://github.com/Automattic/wp-calypso/issues/47768 in favor of this one.
Another report in 26190005-hc
Another report here: 26714885-hc
reported again here: hc-28297718 screenshot: https://d.pr/n/d4u7TW
Got another report on 30054327-hc, where they said:
I have embedded various pdf on one of my pages and on my computer I can view them perfectly. On android phone they can be viewed perfectly as well. But on my iphone and ipad I can only view the first page and I have no option to download it.
Not sure about Android, because in our tests we only see a link, while the user mentioned it works for them. While testing on an iPhone though, it shows just the first page, like a static image. Recommended using Google Drive, that seems to work.
Another report in 4337947-zen
Also reported in 35044216-hc - actually this is a different issue, where the embed doesn't display at all on an iPhone
I'll close this issue now; since #22305 Jetpack's PDF embed does not actually embed PDFs anymore, it only renders a link. If you're experiencing issues with PDF embeds on a site, that site is most likely using WordPress Core's File block instead.
That block lives in the Gutenberg repository: https://github.com/WordPress/gutenberg/