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

Commit 5cb95db

Browse files
committed
Refocus VS after SSO login.
1 parent a403129 commit 5cb95db

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/GitHub.VisualStudio/UI/Views/Controls/LoginControl.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.ComponentModel.Composition;
33
using System.Reactive.Disposables;
44
using System.Reactive.Linq;
5+
using System.Windows;
56
using System.Windows.Input;
67
using GitHub.Controls;
78
using GitHub.Exports;
@@ -38,6 +39,12 @@ public LoginControl()
3839
if (IsVisible)
3940
dotComUserNameOrEmail.TryMoveFocus(FocusNavigationDirection.First).Subscribe();
4041
};
42+
43+
// Refocus VS after a SSO login attempt.
44+
this.WhenAnyObservable(
45+
x => x.ViewModel.GitHubLogin.LoginViaOAuth,
46+
x => x.ViewModel.EnterpriseLogin.LoginViaOAuth)
47+
.Subscribe(_ => Application.Current.MainWindow?.Activate());
4148
}
4249

4350
void SetupDotComBindings(Action<IDisposable> d)

0 commit comments

Comments
 (0)