Skip to content

Commit

Permalink
Fix focus issue when profile selected from nested menu entry (#15077)
Browse files Browse the repository at this point in the history
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

(cherry picked from commit def3742)
Service-Card-Id: 89002014
Service-Version: 1.17
  • Loading branch information
kkostrzewa authored and DHowett committed Apr 25, 2023
1 parent 9ba0636 commit 31dc6d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,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);
}

Expand Down

0 comments on commit 31dc6d8

Please sign in to comment.