issue-742 Grab keyboard focus when the Bitbucket dialog opens. Try to ensure the dialogs are not missed by users by attempting to place them topmost.
This commit is contained in:
Родитель
ffa6d668af
Коммит
a2e79d0a0c
|
@ -24,6 +24,7 @@
|
|||
**/
|
||||
|
||||
using System;
|
||||
using System.Windows.Input;
|
||||
using GitHub.Shared.Controls;
|
||||
using GitHub.Shared.Helpers;
|
||||
|
||||
|
@ -44,10 +45,12 @@ namespace Atlassian.Bitbucket.Authentication.Controls
|
|||
if (string.IsNullOrWhiteSpace(loginTextBox.Text))
|
||||
{
|
||||
loginTextBox.TryFocus().Wait(TimeSpan.FromSeconds(1));
|
||||
Keyboard.Focus(loginTextBox);
|
||||
}
|
||||
else
|
||||
{
|
||||
passwordTextBox.TryFocus().Wait(TimeSpan.FromSeconds(1));
|
||||
Keyboard.Focus(passwordTextBox);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
MinHeight="380"
|
||||
Height="420"
|
||||
Width="420"
|
||||
Topmost="True"
|
||||
Icon="pack://application:,,,/Bitbucket.Authentication;component/Assets/ADG3/Images/Bitbucket-16x16.ico">
|
||||
<Window.DataContext>
|
||||
<viewmodels:CredentialsViewModel />
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
Title="Bitbucket OAuth Authentication"
|
||||
Height="420"
|
||||
Width="420"
|
||||
Topmost="True"
|
||||
Icon="pack://application:,,,/Bitbucket.Authentication;component/Assets/ADG3/Images/Bitbucket-16x16.ico">
|
||||
<Window.DataContext>
|
||||
<viewmodels:OAuthViewModel />
|
||||
|
|
Загрузка…
Ссылка в новой задаче