Fix focus issue when profile selected from nested menu entry (#15077)

Original bug report #15049
Relates to feature #1571 

MenuFlyoutSubItem, when collapsing from profile selection, move focus
back to the titlebar.
An extra Closing event handler is needed to keep focus on the command
shell.

Closes #15049
This commit is contained in:
Kevin Kostrzewa 2023-04-25 16:24:06 -04:00 committed by GitHub
parent 5ed3c76dcb
commit def3742a2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -848,6 +848,10 @@ namespace winrt::TerminalApp::implementation
newTabFlyout.Opening([this](auto&&, auto&&) {
_FocusCurrentTab(true);
});
// Necessary for fly-out sub items to get focus on a tab before collapsing. Related to #15049
newTabFlyout.Closing([this](auto&&, auto&&) {
_FocusCurrentTab(true);
});
_newTabButton.Flyout(newTabFlyout);
}