[MM-47756] Close Downloads when clicking in tabBar (Windows) (#2293)

* Make tabBar disabled when dropdowns are open so that clicking there can close them

* Update src/renderer/components/MainPage.tsx

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>

* Remove console

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
This commit is contained in:
Tasos Boulis
2022-10-20 16:47:53 +03:00
committed by GitHub
parent bbf162e7d0
commit 1f5f5ef71d
2 changed files with 2 additions and 4 deletions

View File

@@ -36,4 +36,3 @@ window.addEventListener('message', async (event) => {
break;
}
});

View File

@@ -295,8 +295,7 @@ class MainPage extends React.PureComponent<Props, State> {
handleCloseDropdowns = () => {
window.ipcRenderer.send(CLOSE_TEAMS_DROPDOWN);
window.ipcRenderer.send(CLOSE_DOWNLOADS_DROPDOWN);
window.ipcRenderer.send(CLOSE_DOWNLOADS_DROPDOWN_MENU);
this.closeDownloadsDropdown();
}
handleMaximizeState = (_: IpcRendererEvent, maximized: boolean) => {
@@ -416,7 +415,7 @@ class MainPage extends React.PureComponent<Props, State> {
onCloseTab={this.handleCloseTab}
onDrop={this.handleDragAndDrop}
tabsDisabled={this.state.modalOpen}
isMenuOpen={this.state.isMenuOpen}
isMenuOpen={this.state.isMenuOpen || this.state.isDownloadsDropdownOpen}
/>
);