Skip to content

Commit aafb917

Browse files
Dismiss flyouts before opening warning dialog when exiting app (#16075)
Updated the function `TerminalPage::CloseWindow` to include logic for closing context and flyout menus so that they are dismissed before the warning is displayed. Closes #16039
1 parent 59aaba7 commit aafb917

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cascadia/TerminalApp/TerminalPage.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,6 +1983,11 @@ namespace winrt::TerminalApp::implementation
19831983
_settings.GlobalSettings().ConfirmCloseAllTabs() &&
19841984
!_displayingCloseDialog)
19851985
{
1986+
if (_newTabButton && _newTabButton.Flyout())
1987+
{
1988+
_newTabButton.Flyout().Hide();
1989+
}
1990+
_DismissTabContextMenus();
19861991
_displayingCloseDialog = true;
19871992
auto warningResult = co_await _ShowCloseWarningDialog();
19881993
_displayingCloseDialog = false;

0 commit comments

Comments
 (0)