Skip to content

Commit 794163f

Browse files
Set default focus on password text box (#644)
Co-authored-by: AleksandrLiakhavetsEPAM <[email protected]>
1 parent 1fecbbb commit 794163f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Views/Askpass.axaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939
<TextBlock Text="{Binding Description}" TextWrapping="Wrap"/>
4040
</Border>
4141

42-
<TextBox Margin="16"
42+
<TextBox Name="PassphraseTextBox"
43+
Margin="16"
4344
MinWidth="300"
4445
Height="32"
46+
Focusable="True"
4547
Text="{Binding Passphrase, Mode=TwoWay}"
4648
PasswordChar="*"
4749
RevealPassword="{Binding ShowPassword, Mode=OneWay}"

src/Views/Askpass.axaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,11 @@ private void EnterPassword(object _1, RoutedEventArgs _2)
5252
Console.Out.Write($"{Passphrase}\n");
5353
App.Quit(0);
5454
}
55+
56+
protected override void OnOpened(EventArgs e)
57+
{
58+
PassphraseTextBox.Focus();
59+
base.OnOpened(e);
60+
}
5561
}
5662
}

0 commit comments

Comments
 (0)