[PR #9162] Teach tab to focus terminal after rename #27458

Open
opened 2026-01-31 09:22:05 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/9162

State: closed
Merged: Yes


Summary of the Pull Request

After rename ends (either by enter or escape) the rename box
gets collapsed and the focus moves to the next tab stop
in the TabView (e.g., new tab button).

To overcome this:

  • Added RenameEnded event to TabHeaderControl
  • Forwarded it as RenamerDeactivated from TerminalTab
  • Registered in the TerminalPage to focus the active control upon
    RenamerDeactivated if focus didn't move to tab menu.

This means, no matter how you close the renamer,
the current terminal gains the focus.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/9162 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request After rename ends (either by enter or escape) the rename box gets collapsed and the focus moves to the next tab stop in the TabView (e.g., new tab button). To overcome this: * Added RenameEnded event to TabHeaderControl * Forwarded it as RenamerDeactivated from TerminalTab * Registered in the TerminalPage to focus the active control upon RenamerDeactivated if focus didn't move to tab menu. This means, no matter how you close the renamer, the current terminal gains the focus. ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/issues/9160 * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [ ] I've discussed this with core contributors already.
claunia added the pull-request label 2026-01-31 09:22:05 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27458