Fix focus on CS rename keyboard interaction
This commit is contained in:
parent
0b0dbdfa03
commit
0288f06d57
|
@ -225,12 +225,14 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
|||
void ColorSchemes::RenameAccept_Click(IInspectable const& /*sender*/, RoutedEventArgs const& /*e*/)
|
||||
{
|
||||
_RenameCurrentScheme(NameBox().Text());
|
||||
RenameButton().Focus(FocusState::Programmatic);
|
||||
}
|
||||
|
||||
void ColorSchemes::RenameCancel_Click(IInspectable const& /*sender*/, RoutedEventArgs const& /*e*/)
|
||||
{
|
||||
IsRenaming(false);
|
||||
RenameErrorTip().IsOpen(false);
|
||||
RenameButton().Focus(FocusState::Programmatic);
|
||||
}
|
||||
|
||||
void ColorSchemes::NameBox_PreviewKeyDown(IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::Input::KeyRoutedEventArgs const& e)
|
||||
|
@ -246,6 +248,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
|||
RenameErrorTip().IsOpen(false);
|
||||
e.Handled(true);
|
||||
}
|
||||
ColorSchemeComboBox().Focus(FocusState::Programmatic);
|
||||
}
|
||||
|
||||
void ColorSchemes::_RenameCurrentScheme(hstring newName)
|
||||
|
|
|
@ -86,6 +86,7 @@ the MIT License. See LICENSE in the project root for license information. -->
|
|||
<!--Rename Button-->
|
||||
<!--Bind IsEnabled to prevent a the color scheme from returning from the dead-->
|
||||
<Button x:Uid="Rename"
|
||||
x:Name="RenameButton"
|
||||
Style="{StaticResource SmallButtonStyle}"
|
||||
Click="Rename_Click"
|
||||
IsEnabled="{x:Bind CanDeleteCurrentScheme, Mode=OneWay}">
|
||||
|
|
Loading…
Reference in a new issue