Rob--W/open-in-browser

Open in Browser doesn't open on Google Slides - Downloads as PDF

softmoth opened this issue · 3 comments

Using Open in Browser version 2.11 on Firefox 85.0.1 on Fedora Linux.
Normally opening PDFs works fine, but on Google Slides it does not present any dialog box.

To reproduce:

  • Go to a Google Slides presentation (example, no need to log in)
  • Click the File ... Download ... PDF menu option
  • If you have saved application/pdf to Open in browser with server-sent MIME, you will notice that nothing happens. There is no Firefox-native dialog box.
  • If you delete that setting from Preferences, then the Open in Browser dialog will pop up, but choosing to open in browser will not then open the second (Firefox-native) dialog

I don't know what kind of magic Google Slides is doing, and how that's interfering with Open in Browser.

I have all permissions available to the Open in Browser extension, and I also allowed it to run in private windows just in case.

Google Slides "downloads" by loading the document in a child frame. When I inspect the network traffic and put a breakpoint on the trigger of the PDF request, I see that the following HTML is appended to the document:

"<iframe src="/presentation/d/1zikdCMTRrIo1-t83EkK2vlqO_bqm8zjIQi4HuPYj3I0/export/pdf?id=1zikdCMTRrIo1-t83EkK2vlqO_bqm8zjIQi4HuPYj3I0&amp;pageid=p" style="display: none;"></iframe>"

... so the document is loaded in the browser, except the frame is hidden.

I assume then that Firefox decides to not display its Open with... dialog when the content is hidden. It could be considered a bug in Firefox, or it could be a feature. Either way, I guess you can close this unless you feel like adding a workaround. Google Sheets is the only site I've noticed this problem on so far, and for my needs I'm OK with disabling the plugin momentarily for this one use case. Thanks for this plugin, it's very helpful!

This also occurs when attempting to download PDFs in Google Drive. Setting application/pdf to Open in browser as application/pdf makes this unusable. Does anyone know of any workarounds?