Repository: microsoft/terminal (language: cpp)

Issue:
"Do you want to close all tabs?" content dialog is opened behind a menu flyout
### Windows Terminal version

1.19.230925002-preview

### Windows build number

10.0.22621.0

### Other Software

_No response_

### Steps to reproduce

1. Open terminal
2. Open two tabs
3. Click on the down arrow to open the menu flyout
4. Click the window close x button


### Expected Behavior

The window closing code should close any menu flyouts before displaying the content dialog (via the VisualTreeHelper routines).



### Actual Behavior

![terminal](https://github.com/microsoft/terminal/assets/28826959/f30b5574-914d-4f01-a591-32c5b620497e)



Discussion / hints:

Fix patch:
diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp
index 64dd32c41f4..6a4715e3ca7 100644
--- a/src/cascadia/TerminalApp/TerminalPage.cpp
+++ b/src/cascadia/TerminalApp/TerminalPage.cpp
@@ -1983,6 +1983,11 @@ namespace winrt::TerminalApp::implementation
             _settings.GlobalSettings().ConfirmCloseAllTabs() &&
             !_displayingCloseDialog)
         {
+            if (_newTabButton && _newTabButton.Flyout())
+            {
+                _newTabButton.Flyout().Hide();
+            }
+            _DismissTabContextMenus();
             _displayingCloseDialog = true;
             auto warningResult = co_await _ShowCloseWarningDialog();
             _displayingCloseDialog = false;


Test patch: