## 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.
23 lines
677 B
Plaintext
23 lines
677 B
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
import "TerminalTabStatus.idl";
|
|
|
|
namespace TerminalApp
|
|
{
|
|
delegate void TitleChangeRequestedArgs(String title);
|
|
|
|
[default_interface] runtimeclass TabHeaderControl : Windows.UI.Xaml.Controls.UserControl, Windows.UI.Xaml.Data.INotifyPropertyChanged
|
|
{
|
|
String Title { get; set; };
|
|
Double RenamerMaxWidth { get; set; };
|
|
|
|
TabHeaderControl();
|
|
void BeginRename();
|
|
|
|
TerminalTabStatus TabStatus { get; set; };
|
|
|
|
event TitleChangeRequestedArgs TitleChangeRequested;
|
|
event Windows.Foundation.TypedEventHandler<Object, Object> RenameEnded;
|
|
}
|
|
}
|