Close tab context menu on titlebar click (#8010)

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
This commit is contained in:
MPela 2020-10-27 03:24:54 +01:00 committed by GitHub
parent 5a518e5e58
commit 7e8600147e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: