Open Bug 1496731 Opened 2 years ago Updated 10 months ago

downloading pdf or clicking print opens a blank tab


(Firefox :: Downloads Panel, defect, P5)

62 Branch




(Reporter: karenvedus, Unassigned)



(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0

Steps to reproduce:

In Google search, or a web page, I click a pdf link to download a pdf in NitroPDF.   When I click a print option on a page to print.

Actual results:

When I click to download pdf, a pdf downloads and opens in Nitro, but ALSO opens a blank tab.  When I click to print, a print dialogue comes up, but so does a blank tab.

Expected results:

ONly the Nitro pdf should open.  only the print page should open with the print dialogue
Possibly a regression.

The problem with target="_blank" links leaving a blank tab after showing the download dialog or downloading a file was fixed in Firefox 54 per

(My current connection is too slow to run a MozRegression, but I could try it tonight.)
I have Firefox 62!   So how does this response apply?
Currently, I cannot replicate this problem using a quick test page I set up:

Maybe there are particular circumstances where the empty tab is left behind.
I couldn't reproduce this bug with Firefox 62.0.3 (64 bit).
I used your link, and yes, it does not happen. So why is it happening?
I tested some other scenarios, and one leaves a blank tab: target="_blank" on a cross-site download link (styled in red).
Ok.  So what do I do with the above information?  Any ideas?  Is it malware,etc
Hi Karen, Bugzilla is a tool for reporting bugs in Firefox. The first step is to provide reliable steps to reproduce the problem. I think I have done that now with a clear demonstration page.

Next, hopefully this issue will get a high enough priority for a developer to assess why the problem exists, whether it can be fixed without breaking something important, and how/when that might happen.

If my comments seem impersonal, it is because they are directed to that process, and not directly to you. If I am lucky enough to find a workaround for Firefox 62, I will mention it, but otherwise, this is how Firefox is working right now for both of us.
No complaints.  Just wondering and you answered my questions clearly.  Thank you.
(In reply to jscher2000 from comment #6)
> I tested some other scenarios, and one leaves a blank tab: target="_blank"
> on a cross-site download link (styled in red).

After further testing, the issue was caused on my Firefox by a user script that marks all cross-site links with rel="noopener noreferrer". I updated my test page accordingly to show that this occurs if the site uses either of these combinations: 

<a href="uri" target="_blank" rel="noopener">
<a href="uri" target="_blank" rel="noreferrer">

I'm not sure how that breaks closing the blank tab.
Component: Untriaged → PDF Viewer
Is this only an issue with NitroPDF or does this happen with the built in PDF viewer in Firefox?
Flags: needinfo?(karenvedus)
I do not use the built in viewer.   This is with Nitro PDF.  Which is what my OPTION is set to open pdfs with.
Flags: needinfo?(karenvedus)
I'm moving this out of the PDF Viewer component since it's not related to the built in viewer.
Component: PDF Viewer → Downloads Panel

Not breaking any functionality, it's an annoyance, non critical one. Would take a patch.

Ever confirmed: true
Priority: -- → P5
QA Contact: past
Duplicate of this bug: 1512191

Depending on user settings, a PDF file may be opened on a new tab or saved to a default folder.
however, it is confusing that the download occurs silently, and it gives the false impression to the user that the link did not work.
To add the confusion, Firefox may open a blank tab.

Proposed solution:

  • when Save link without prompting a dialog is selected as the default action,
  1. no not create a blank tab

  2. make the recent download, like one on Tools-> Downloads more visible on the completion of small and quickly loaded files.
    Some kind of indicator icon changing colors on the top toolbar, preferably with a single line hint text, and linked to a list of the last loaded filepath(s) would do.

Bugbug thinks this bug is a regression, but please revert this change in case of error.

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