From 7728e930bee3a8893687e484b4a84f89a6e7319a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 8 Jul 2019 12:06:37 -0400 Subject: [PATCH] delay focus on entry on ios too --- src/App/Pages/BaseContentPage.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/App/Pages/BaseContentPage.cs b/src/App/Pages/BaseContentPage.cs index b59e01aef..d3677a9cf 100644 --- a/src/App/Pages/BaseContentPage.cs +++ b/src/App/Pages/BaseContentPage.cs @@ -11,8 +11,8 @@ namespace Bit.App.Pages { private IStorageService _storageService; - protected int AndroidShowModalAnimationDelay = 400; - protected int AndroidShowPageAnimationDelay = 100; + protected int ShowModalAnimationDelay = 400; + protected int ShowPageAnimationDelay = 100; public DateTime? LastPageAction { get; set; } @@ -77,21 +77,16 @@ namespace Bit.App.Pages } await Task.Run(async () => { - await Task.Delay(fromModal ? AndroidShowModalAnimationDelay : AndroidShowPageAnimationDelay); + await Task.Delay(fromModal ? ShowModalAnimationDelay : ShowPageAnimationDelay); Device.BeginInvokeOnMainThread(async () => await DoWorkAsync()); }); } protected void RequestFocus(InputView input) { - if(Device.RuntimePlatform == Device.iOS) - { - input.Focus(); - return; - } Task.Run(async () => { - await Task.Delay(AndroidShowModalAnimationDelay); + await Task.Delay(ShowModalAnimationDelay); Device.BeginInvokeOnMainThread(() => input.Focus()); }); }