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

[Block] File: PDF preview display in editor after toggling inline embed option #62120

Open
ironprogrammer opened this issue May 30, 2024 · 3 comments
Labels
[Block] File Affects the File Block Browser Issues Issues or PRs that are related to browser specific problems [Type] Bug An existing feature does not function as intended

Comments

@ironprogrammer
Copy link
Contributor

ironprogrammer commented May 30, 2024

Description

When the "Show inline embed" option is toggled off and back on for a PDF (using the File block), the PDF is displayed as a gray box in the editor (backend). Occurs in Safari, but not Chrome or Firefox.

This issue was also mentioned in #55493 (comment), though that issue and resulting PR focused on the frontend display of inline PDFs, not display in the editor.

Step-by-step reproduction instructions

  1. Using the File block, upload or insert a PDF file. Observe that it displays in the editor as expected.
  2. Toggle OFF the "Show inline embed" option. The PDF preview will be hidden.
  3. Toggle ON the "Show inline embed" option. Observe that the PDF preview displays as a gray box.

Refreshing the page will restore the PDF preview if the option is enabled.

Screenshots, screen recording, code snippet

Animated GIF that shows:

pdf-embed-retest

Environment info

  • macOS 14.5, Safari 17.5
  • WordPress 6.5.3 and trunk
  • Gutenberg 18.4.1 (tested both active and inactive)

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

@ironprogrammer ironprogrammer added the [Type] Bug An existing feature does not function as intended label May 30, 2024
@t-hamano t-hamano added Browser Issues Issues or PRs that are related to browser specific problems [Block] File Affects the File Block labels May 30, 2024
@talldan
Copy link
Contributor

talldan commented May 30, 2024

I also saw this issue here was reported, which seems similar - #62037

cc @DAreRodz

@ironprogrammer
Copy link
Contributor Author

In response to @talldan:

I also saw this issue here was reported, which seems similar - #62037

Yeah, I saw that as well, though the description seems to be a dupe of #55493 (frontend focused), which I was unsure should be marked as such and the original reopened, as there haven't been additional reproduction confirmations as of yet.

@ironprogrammer ironprogrammer changed the title [Block] File: PDF display after toggling inline embed option [Block] File: PDF preview display in editor after toggling inline embed option May 30, 2024
@DAreRodz
Copy link
Contributor

Yup, it seems to be a different bug this time. The previous one specifically happened in the front-end part, whereas this one is related to the editor. Would the fix be similar, though? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] File Affects the File Block Browser Issues Issues or PRs that are related to browser specific problems [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants