Skip to content

Commit

Permalink
Close tab context menu on titlebar click (#8010)
Browse files Browse the repository at this point in the history
Close the tab context menu when clicking on the title bar

## Detailed Description of the Pull Request / Additional comments
Following #2438, hide the tabs context menu on `TerminalPage::TitlebarClicked()`. 
We don't know which of the tabs is showing the context menu, do it on all tabs.

## Validation Steps Performed
Open the context menu from any tab, click on title bar and see the context menu disappear.

Closes #7988
  • Loading branch information
mpela81 committed Oct 27, 2020
1 parent 5a518e5 commit 7e86001
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2241,6 +2241,15 @@ namespace winrt::TerminalApp::implementation
{
_newTabButton.Flyout().Hide();
}

for (const auto& tab : _tabs)
{
auto tabImpl{ _GetStrongTabImpl(tab) };
if (tabImpl->GetTabViewItem().ContextFlyout())
{
tabImpl->GetTabViewItem().ContextFlyout().Hide();
}
}
}

// Method Description:
Expand Down

0 comments on commit 7e86001

Please sign in to comment.