Closed Bug 1783373 Opened 2 months ago Closed 2 months ago

Download panel will not appear in private window when taking a screenshot using devtools

Categories

(DevTools :: General, defect, P2)

Firefox 104
defect

Tracking

(firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: 6k64x4ma, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

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

Steps to reproduce:

  1. Open a private window and a non-private window.
  2. Take a screenshot using Inspector or Responsive Design Mode on the private window.
  3. Close the non-private window and take another screenshot.

Actual results:

  1. If there is a non-private window, the download panel will appear in the non-private window.
  2. If there are no non-private windows, the download panel will not be displayed.

Expected results:

The download panel should be displayed in a private window in both cases.

Thanks for filing, Nicolas will take a look

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(nchevobbe)
Priority: -- → P2

This is where we trigger the Download panel behavior:

https://searchfox.org/mozilla-central/rev/6ec440e105c2b75d5cae9d34f957a2f85a106d54/devtools/client/shared/screenshot.js#363-371

const download = await Downloads.createDownload({
  source: sourceURI,
  target: targetFile,
});
const list = await Downloads.getList(Downloads.ALL);
// add the download to the download list in the Downloads list in the Browser UI
list.add(download);
// Await successful completion of the save via the download manager
await download.start();

It looks like Downloads.createDownload take a isPrivate param (toolkit/components/downloads/Downloads.jsm#81-82,107-113 ) which we could pass from DevTools code

Flags: needinfo?(nchevobbe)
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/176ca1d8bfc6
[devtools] Pass isPrivate property to Downloads.createDownload. r=jdescottes.
Regressions: 1784544
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.