Closed Bug 1632277 Opened 5 years ago Closed 4 years ago

Open Edge in a toolbar-less window when Edge is selected as opener of PDF

Categories

(Firefox :: PDF Viewer, enhancement, P2)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 79
Tracking Status
firefox77 --- unaffected
firefox78 + verified
firefox79 --- verified

People

(Reporter: jaws, Assigned: mstriemer)

References

Details

Attachments

(4 files)

When a user opens a PDF that contains features that PDF.js doesn't support, we show a notification bar that offers the user to open the PDF in an external PDF viewer.

Are there any changes we can make to this notification bar or experience that would bring the user back to Firefox easier after using the external viewer?

Component: Printing → PDF Viewer
Product: Toolkit → Firefox
Attached image Fallback notification bar (deleted) —

I discussed this today with Aaron Benson and we decided on:

  1. Delay showing the notification bar for forms until the user tries to interact with the form (https://github.com/mozilla/pdf.js/issues/11838)
  2. If Edge is the default viewer, investigate the possibility of opening Edge in a toolbar-less window

Since #1 is handled by a GitHub issue, we can use this bug for #2.

Summary: Investigate UX options for the PDF.js fallback bar that would get less users to churn → Investigate the possibility of opening Edge in a toolbar-less window when Edge is selected as opener of PDF
Assignee: nobody → mstriemer
Status: NEW → ASSIGNED
Severity: -- → N/A
Attachment #9145672 - Attachment description: Bug 1632277 - Launch PDFs in app mode when default r?jaws → Bug 1632277 - Part 1: Launch PDFs in app mode when default r?jaws
Summary: Investigate the possibility of opening Edge in a toolbar-less window when Edge is selected as opener of PDF → Open Edge in a toolbar-less window when Edge is selected as opener of PDF

Adobe reader also has parameters for Opening PDF Files.

Should Adobe reader also be opened with parameters?

Flags: needinfo?(jaws)

(In reply to kernp25 from comment #6)

Adobe reader also has parameters for Opening PDF Files.

Should Adobe reader also be opened with parameters?

Thanks, but we don't need to use parameters there since those are already standalone PDF viewers.

Flags: needinfo?(jaws)

[Tracking Requested - why for this release]: Making it easier to access PDF.js will be a large part of Firefox 78 release and this bug tracks some of the work that just missed landing before the uplift from Nightly -> Beta.

Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e4f8d9d96ce Part 1: Launch PDFs in app mode when default r=jaws,tkikuchi https://hg.mozilla.org/integration/autoland/rev/966b6abc3463 Part 2: Remove assembleSingleArgument helper r=tkikuchi
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 79

We could open Edge in app mode for all file types, instead of restricting to PDF.

Regressions: 1643673

(In reply to Marco Castelluccio [:marco] from comment #12)

We could open Edge in app mode for all file types, instead of restricting to PDF.

What other types do you have in mind that would be useful for this?

Flags: needinfo?(mcastelluccio)

I don't remember exactly what other file types (except HTML, XHTML, and so on) Edge is registered to open by default. If I'm not mistaken, SVG, XPS (less important than PDF, but still...).
I don't have a Windows machine at hand to double check.

Flags: needinfo?(mcastelluccio)

(In reply to Marco Castelluccio [:marco] from comment #14)

I don't remember exactly what other file types (except HTML, XHTML, and so on) Edge is registered to open by default. If I'm not mistaken, SVG, XPS (less important than PDF, but still...).
I don't have a Windows machine at hand to double check.

Can you file a bug and attach a patch? I can test out the patch for you. It is a reasonable request, though I want to get this bug uplifted to Firefox 77 and it would be easier to uplift for just one file association and have the other file associations ride the trains.

Flags: needinfo?(mcastelluccio)
Depends on: 1644145

Hi Cosmin, can you please verify this?

Flags: qe-verify+
Flags: needinfo?(cmuntean)
No longer depends on: 1644145

Hi Jared,

Sure, I can verify this, but can you please give me more information?

From what I understand with this fix and the GitHub one, when you navigate to a PDF form in Firefox, the yellow notification is displayed only if you click inside the PDF form. If the Edge is the default viewer the yellow notification is no longer displayed and the PDF form is automatically opened in Edge browser after clicking on the PDF form. Is this correct?

So in order to verify this issue, the following STR are correct?

[Prerequisites]:

  • Have the OS preference set to open PDF file in Edge.
  • Have the Firefox preference option "Portable Document Format (PDF)" set to "Use Windows default application".
  • Have the latest Nightly build installed.

[Steps to reproduce]:

  1. Open the Nightly browser with the profile from prerequisites.
  2. Navigate to a PDF form (eg: this form)
  3. Click inside the PDF form.
  4. Observe the behavior.

[Expected Results]:

  • The PDF form is successfully loaded.
  • When clicking on the PDF form opened, the form is automatically opened in Edge.

However, using these steps on the latest Nightly 79.0a1 build, when I navigate to a PDF form it is automatically opened in Edge, and is not loaded in Nightly browser.

Also, If I set in Firefox to open the PDF document in Edge, when I navigate to a PDF form, the file is automatically downloaded. Not sure why the behavior is different than the above one.

Flags: needinfo?(cmuntean) → needinfo?(jaws)
Flags: needinfo?(jaws) → needinfo?(mstriemer)

This bug isn't strictly related to the yellow unsupported bar but that is a way to trigger this. I've been using two files to test this with, one that is downloaded with Content-disposition: attachment from the server, and also doesn't specify the PDF content-type [1]; and one that has the yellow bar [2]. The yellow bar isn't necessarily related but this is a likely case that the user would end up in Edge.

The Firefox preference of what to do with a PDF shouldn't matter. For my testing I mostly used Open in Nightly.

STR

  1. Start a PDF download
  2. Select "Open with..." and leave the default (Chromium Edge) selected
  3. PDF opens in Edge application mode without browser toolbars

Setting browser.pdf.launchDefaultEdgeAsApp to false should disable this behaviour and open the PDF in a new tab in Edge.

At step 2, changing your choice from the default and explicitly selecting Edge should also open the PDF in a new tab in Edge.

Does this help? Let me know if I can help more.

[1] https://smallpdf.com/shared#pt=02fdd17c-5a41-4a2c-a381-e094422dca8d
[2] https://www.irs.gov/pub/irs-pdf/f1040.pdf

Flags: needinfo?(mstriemer) → needinfo?(cmuntean)

Comment on attachment 9145672 [details]
Bug 1632277 - Part 1: Launch PDFs in app mode when default r?jaws

Beta/Release Uplift Approval Request

  • User impact if declined: We are improving PDF support in 78 and this is a patch to open PDFs in Edge as a PDF reader rather than in the regular browser. We think this will allow users to accomplish their goal of working on the PDF and then returning to Firefox.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment 18.
  • List of other uplifts needed: Bug 1643673
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): This change is in the downloads code which is frequently used. This means it could have unexpected consequences but also that this code has definitely been run on Nightly. One crash was quickly detected on Windows 7 and fixed (bug 1643673).

The change can be disabled by flipping the browser.pdf.launchDefaultEdgeAsApp pref if needed.

  • String changes made/needed: No
Attachment #9145672 - Flags: approval-mozilla-beta?
Attachment #9148171 - Flags: approval-mozilla-beta?
QA Whiteboard: [qa-triaged]

@Mark thank you for your help and all the information.

I have verified this on the latest Nightly 79.0a1 (Build ID: ) build on Windows 10 x64, Windows 8.1 x32, Windows 7 x64, and mac 10.14.6. Tested with both provided PDF links. Here are the results:

  • On all Windows version, the feature works correctly if I have Microsoft Edge Chromium installed and set by default to open PDF files. If I choose to open with Microsoft Edge (default), the PDF is opened in Edge application mode without browser toolbars.
  • On macOS 10.14.6 it seems that this feature doesn't work. The PDF is opened in a new tab of Edge and the browser toolbars are displayed.

Mark, can you please confirm the following?

  1. Does this feature work only with Microsoft Edge Chromium installed and if it is set by default to open PDF files? I'm asking this because if I don't have Edge Chromium installed and I'm using the old Edge preinstalled browser, after opening the PDF file the browser toolbars are displayed.
  2. Should this feature also work on macOS or is it not supported?
Flags: needinfo?(cmuntean) → needinfo?(mstriemer)
  1. This is only for the Chromium based Edge. I couldn't find a similar feature to use for the old Edge.
  2. This feature is intended to be Windows only since that's where Edge is set as the default PDF reader. It shouldn't have any effect on macOS.
Flags: needinfo?(mstriemer)

(In reply to Cosmin Muntean [:cmuntean], Ecosystem QA from comment #20)

  1. Should this feature also work on macOS or is it not supported?

Does Edge for Mac set itself as the default PDF viewer on macOS?

Flags: needinfo?(mcastelluccio) → needinfo?(cmuntean)

(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #22)

Does Edge for Mac set itself as the default PDF viewer on macOS?

No, I had to manually set Edge Chromium as the default PDF viewer.

Based on comment 20 and comment 21, the feature work as expected on Nightly 79.0a1. Considering this I will mark this issue as verified on Firefox 79 and I will verify it as soon as it is uplifted to Beta 78.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(cmuntean)

Comment on attachment 9145672 [details]
Bug 1632277 - Part 1: Launch PDFs in app mode when default r?jaws

approved for 78.0b6

Attachment #9145672 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9148171 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I have verified this issue on the latest Beta 78.b6 build on Windows 10 x64, Windows 8.1 x32 and Windows 7 x64.

  • If Edge Chromium is the default PDF viewer the PDF is correctly opened in the Edge application mode without browser toolbars. Tested with both provided PDF links in comment 18.

(In reply to Cosmin Muntean [:cmuntean], Ecosystem QA from comment #23)

(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #22)

Does Edge for Mac set itself as the default PDF viewer on macOS?

No, I had to manually set Edge Chromium as the default PDF viewer.

Great, thank you for sharing that. As such, it's less of a priority to make this same change on macOS.

(In reply to kernp25 from comment #6)

Adobe reader also has parameters for Opening PDF Files.

Should Adobe reader also be opened with parameters?

same issue with me in last month what is the solution.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: