From 7655c251a2433a2721e679710307985146b084ad Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 30 Aug 2017 22:19:14 -0400 Subject: [PATCH] re-try focus on password lock page --- src/App/Pages/Lock/LockPasswordPage.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/App/Pages/Lock/LockPasswordPage.cs b/src/App/Pages/Lock/LockPasswordPage.cs index 73e017b2b..b2516761f 100644 --- a/src/App/Pages/Lock/LockPasswordPage.cs +++ b/src/App/Pages/Lock/LockPasswordPage.cs @@ -100,8 +100,30 @@ namespace Bit.App.Pages { base.OnAppearing(); PasswordCell.InitEvents(); - PasswordCell.Entry.FocusWithDelay(); PasswordCell.Entry.Completed += Entry_Completed; + + if(Device.RuntimePlatform == Device.Android) + { + Task.Run(async () => + { + for(int i = 0; i < 5; i++) + { + await Task.Delay(1000); + if(!PasswordCell.Entry.IsFocused) + { + Device.BeginInvokeOnMainThread(() => PasswordCell.Entry.FocusWithDelay()); + } + else + { + break; + } + } + }); + } + else + { + PasswordCell.Entry.Focus(); + } } protected override void OnDisappearing()