Skip to content

PDF embedding/preview is greedily blocked on Android Firefox/Chrome even though it should work #58891

@asdofindia

Description

@asdofindia

Description

In an Android 13 device with Firefox and Chrome browsers, it is possible to have inline embed PDF be visible. But the present implementation based on discussions in #46382 #34825 etc makes it that if the User Agent includes "Mobi" or "Android" the pdf embed is hidden totally.1

This greedily blocks even browsers/devices that do support PDF

Step-by-step reproduction instructions

  1. Go to Gutenberg editor
  2. Insert a file block with preview turned on
  3. Go to a mobile device
  4. Do not see the preview

Screenshots, screen recording, code snippet

No response

Environment info

Android 13 with wordpress.com blog

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions