Open Bug 1496731 Opened 3 years ago Updated 4 months ago

downloading pdf or clicking print opens a blank tab

Categories

(Firefox :: Downloads Panel, defect, P5)

62 Branch
defect

Tracking

()

People

(Reporter: karenvedus, Unassigned)

References

Details

(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 https://bugzilla.mozilla.org/show_bug.cgi?id=1301056

(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: 

https://www.jeffersonscher.com/res/downbug.html

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). https://www.jeffersonscher.com/res/downbug.html
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).
> https://www.jeffersonscher.com/res/downbug.html

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.

Status: UNCONFIRMED → NEW
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

I'm encountering the same bug, and the resulting migraines, when trying to download from Artstation. More than a minor nuisance.

  1. In Firefox:

The whole screen would flash white, giving me an awful migraine. I eventually found that Firefox was opening and closing a blank tab for each download.

  1. In Safari:

There was a lot of pain/animation in the upper right corner, but not nearly as bad as the flashing in Firefox.

bug 1678965 refers to Firefox opening new blank tabs for each downloaded file, and requests that Firefox open and close them. I'm having trouble with the flashing, so the opening is a problem too.

Turning off "Open links in tabs instead of new windows" simply cause FF to open and close a new window. The pain/flashing hurts either way.

(In reply to MarjaE from comment #18)

I'm encountering the same bug, and the resulting migraines, when trying to download from Artstation. More than a minor nuisance.

  1. In Firefox:

The whole screen would flash white, giving me an awful migraine. I eventually found that Firefox was opening and closing a blank tab for each download.

Would it be preferable if the unwanted extra tab used a dark background? Firefox should do that if you set a preference indicating that your system has a dark theme preference. This also will cause some websites to appear on a dark background as well as various internal pages.

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box in the page, type or paste ui.systemUsesDarkTheme

If Firefox shows a bar with Boolean Number String and a + button:

(3A) Click Number, then click the + button, edit the value to 1 then press Enter or click the blue check mark button to save the change.

Alternately, if Firefox shows an entry with a value of zero:

(3B) Double-click the value and edit it to 1 then press Enter or click the blue check mark button to save the change.

Alternately, if Firefox shows an entry with a value of true or false, this preference was not set up correctly before:

(3C) Click the garbage can at the end of the line value and return to step (3A).


Perhaps another option would be to remove target="_blank" from links, and then manage which links on the same tab versus a new tab/window yourself. There seems to be several extensions for that. I recognize the developer of this one: https://addons.mozilla.org/firefox/addon/always-open-in-current-tab/

I have an astigmatism, it's hard to correct, so I usually have an easier time reading black text on a white background than the reverse. One exception is if there are blinking cursors. I have tropuble seeing anything around blinking cursors, flashing lights, etc., but less trouble with light cuursors on black backgrounds on e-ink screens.

I also prefer to open webpage links in new tabs, just not download links.

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