Closed
Bug 1461134
Opened 7 years ago
Closed 7 years ago
SaveAs in browser.downloads.download should keep popup open
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1366330
People
(Reporter: 5i13ghzt462u, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180507144316
Steps to reproduce:
In a WebExtension browser_action (or, not verified, but I think so: page_action), i.e. in a popup:
1. Create an object URL via createObjectURL()
2. Download it with browser.downloads.download (saveAs set to true)
Actual results:
"SaveAs" dialog opens -> the browser popup closes -> the object URL is revoked (as if revokeObjectURL was called) -> Download fails
It can be verified that this is the issue by using the developer tools and enable the "keep popups open" button. If this is done, the download works.
Expected results:
IMHO a good way to handle it would be to leave the popup open for the time the "SaveAs" dialog is shown, … or respectively, just don't close the popup at all in this case.
Otherwise the impact of this bug is:
You cannot use downloads.download with saveAs=true in browser popups, i.e. browser add-ons cannot download any data via this API (and file name selection) in any popup.
So effectively, that part of this API is not usable in this situation.
Fedora 28, GNOME
Has STR: --- → yes
Component: Untriaged → Extension Compatibility
Updated•7 years ago
|
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
(In reply to rugk from comment #0)
> Otherwise the impact of this bug is:
> You cannot use downloads.download with saveAs=true in browser popups, i.e.
> browser add-ons cannot download any data via this API (and file name
> selection) in any popup.
> So effectively, that part of this API is not usable in this situation.
>
> Fedora 28, GNOME
But you can send message to your background script and download from there?
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
> But you can send message to your background script and download from there?
Yeah, but that's not how it should be done, is not it? That is a workaround, but does not solve the actual problem AFAIK.
So the workaround suggested by @Gingerbread Man also has some problems, as I noticed: https://bugzilla.mozilla.org/show_bug.cgi?id=1462926
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•