Open Bug 1752349 Opened 4 years ago Updated 4 years ago

[Linux] Downloads panel for the first download overlaps other windows

Categories

(Firefox :: Downloads Panel, defect, P5)

Firefox 98
Desktop
Linux
defect

Tracking

()

Tracking Status
firefox96 --- affected
firefox97 --- affected
firefox98 --- affected

People

(Reporter: hyacoub, Unassigned)

References

Details

Affected versions

Firefox 98.0a1 (2022-01-27)

Affected platforms

Ubuntu 20.04 x64

Steps to reproduce

  1. Open Firefox and maximise it.
  2. Open other program (for example a terminal window) and return to Firefox.
  3. Use a site that triggers a download in the background (after some time; you can use gdocs' export function which usually takes a little while to actually generate stuff).
  4. Switch to a different window/app before the download starts

Expected result

Downloads panel shouldn't overlap other windows.

Actual Result

Downloads panel for the first download overlaps other windows.

See Also: → 1741076

This is a result of the code at:

https://searchfox.org/mozilla-central/rev/78963fe42f8d5f582f84da84a5e78377b6c1fc32/browser/components/downloads/DownloadsCommon.jsm#999-1012

    let shouldOpenDownloadsPanel =
      aType == "start" &&
      Services.prefs.getBoolPref(
        "browser.download.improvements_to_download_panel"
      ) &&
      DownloadsCommon.summarizeDownloads(this._downloads).numDownloading <= 1 &&
      browserWin == Services.focus.activeWindow &&
      gAlwaysOpenPanel;

    if (
      this.panelHasShownBefore &&
      aType != "error" &&
      !shouldOpenDownloadsPanel
    ) {
      // For new downloads after the first one, don't show the panel
      // automatically, but provide a visible notification in the topmost
      // browser window, if the status indicator is already visible.
      DownloadsCommon.log("Showing new download notification.");
      browserWin.DownloadsIndicatorView.showEventNotification(aType);
      return;
    }
    this.panelHasShownBefore = true;
    browserWin.DownloadsPanel.showPanel();

specialcasing whether we've shown the panel before.

When we remove the browser.download.improvements_to_download_panel pref, we can just remove the tracking of whether we've shown the panel before, and this bug will go away.

If someone feels strongly we could fix it in the meantime but I don't think it's a big deal, given it's a one-off, and the logic here is a little tedious.

Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.