Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit 7c7eab4

Browse files
author
J Wyman
authored
Merge pull request #746 from mminns/issue-742
issue-742 Grab keyboard focus when the Bitbucket dialog opens.
2 parents ffa6d66 + a2e79d0 commit 7c7eab4

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Bitbucket.Authentication/Src/Controls/CredentialsControl.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
**/
2525

2626
using System;
27+
using System.Windows.Input;
2728
using GitHub.Shared.Controls;
2829
using GitHub.Shared.Helpers;
2930

@@ -44,10 +45,12 @@ protected override void SetFocus()
4445
if (string.IsNullOrWhiteSpace(loginTextBox.Text))
4546
{
4647
loginTextBox.TryFocus().Wait(TimeSpan.FromSeconds(1));
48+
Keyboard.Focus(loginTextBox);
4749
}
4850
else
4951
{
5052
passwordTextBox.TryFocus().Wait(TimeSpan.FromSeconds(1));
53+
Keyboard.Focus(passwordTextBox);
5154
}
5255
}
5356
}

Bitbucket.Authentication/Src/Views/CredentialsWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
MinHeight="380"
4343
Height="420"
4444
Width="420"
45+
Topmost="True"
4546
Icon="pack://application:,,,/Bitbucket.Authentication;component/Assets/ADG3/Images/Bitbucket-16x16.ico">
4647
<Window.DataContext>
4748
<viewmodels:CredentialsViewModel />

Bitbucket.Authentication/Src/Views/OAuthWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
Title="Bitbucket OAuth Authentication"
4242
Height="420"
4343
Width="420"
44+
Topmost="True"
4445
Icon="pack://application:,,,/Bitbucket.Authentication;component/Assets/ADG3/Images/Bitbucket-16x16.ico">
4546
<Window.DataContext>
4647
<viewmodels:OAuthViewModel />

0 commit comments

Comments
 (0)