mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Bug 873053 - Make Downloads button open the Library if it's in the menu panel. r=mak.
This commit is contained in:
parent
c5b1a88441
commit
96f4899d16
@ -523,7 +523,14 @@ const DownloadsIndicatorView = {
|
||||
DownloadsCommon.getIndicatorData(window).attention = false;
|
||||
BrowserDownloadsUI();
|
||||
} else {
|
||||
DownloadsPanel.showPanel();
|
||||
// If the downloads button is in the menu panel, open the Library
|
||||
let widgetGroup = CustomizableUI.getWidget("downloads-button");
|
||||
let widget = widgetGroup.forWindow(window);
|
||||
if (widget.areaType == CustomizableUI.AREATYPE_MENU_PANEL) {
|
||||
DownloadsPanel.showDownloadsHistory();
|
||||
} else {
|
||||
DownloadsPanel.showPanel();
|
||||
}
|
||||
}
|
||||
|
||||
aEvent.stopPropagation();
|
||||
|
Loading…
Reference in New Issue
Block a user