From 9e1abb13a3ec5c5ddd6108cb700a2db9ac382acb Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 22 Nov 2018 21:16:02 -0500 Subject: [PATCH] Revert "dont focus on cell tapped" This reverts commit bbea5fe53c7788b24301e6324a362ff3eca0e801. --- src/App/Controls/FormEditorCell.cs | 6 ++---- src/App/Controls/FormEntryCell.cs | 28 +++++++++++++--------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/App/Controls/FormEditorCell.cs b/src/App/Controls/FormEditorCell.cs index 84ed3808b..b77457c21 100644 --- a/src/App/Controls/FormEditorCell.cs +++ b/src/App/Controls/FormEditorCell.cs @@ -34,21 +34,19 @@ namespace Bit.App.Controls public ExtendedEditor Editor { get; private set; } - /* private void FormEditorCell_Tapped(object sender, EventArgs e) { Editor.Focus(); } - */ public void InitEvents() { - // Tapped += FormEditorCell_Tapped; + Tapped += FormEditorCell_Tapped; } public void Dispose() { - // Tapped -= FormEditorCell_Tapped; + Tapped -= FormEditorCell_Tapped; } } } diff --git a/src/App/Controls/FormEntryCell.cs b/src/App/Controls/FormEntryCell.cs index 3a65baa2a..4d30c9516 100644 --- a/src/App/Controls/FormEntryCell.cs +++ b/src/App/Controls/FormEntryCell.cs @@ -10,7 +10,7 @@ namespace Bit.App.Controls public class FormEntryCell : ExtendedViewCell, IDisposable { private VisualElement _nextElement; - // private TapGestureRecognizer _tgr; + private TapGestureRecognizer _tgr; private StackLayout _buttonStackLayout = null; public FormEntryCell( @@ -64,7 +64,7 @@ namespace Bit.App.Controls if(imageSource != null) { - // _tgr = new TapGestureRecognizer(); + _tgr = new TapGestureRecognizer(); var theImage = new CachedImage { @@ -74,7 +74,7 @@ namespace Bit.App.Controls WidthRequest = 18, HeightRequest = 18 }; - // theImage.GestureRecognizers.Add(_tgr); + theImage.GestureRecognizers.Add(_tgr); imageStackLayout.Children.Add(theImage); } @@ -188,15 +188,14 @@ namespace Bit.App.Controls Entry.Completed += Entry_Completed; } - // if(_tgr != null) - // { - // _tgr.Tapped += Tgr_Tapped; - // } + if(_tgr != null) + { + _tgr.Tapped += Tgr_Tapped; + } - // Tapped += FormEntryCell_Tapped; + Tapped += FormEntryCell_Tapped; } - /* private void Tgr_Tapped(object sender, EventArgs e) { Entry.Focus(); @@ -206,7 +205,6 @@ namespace Bit.App.Controls { Entry.Focus(); } - */ private void Entry_Completed(object sender, EventArgs e) { @@ -215,12 +213,12 @@ namespace Bit.App.Controls public void Dispose() { - // if(_tgr != null) - // { - // _tgr.Tapped -= Tgr_Tapped; - // } + if(_tgr != null) + { + _tgr.Tapped -= Tgr_Tapped; + } - // Tapped -= FormEntryCell_Tapped; + Tapped -= FormEntryCell_Tapped; Entry.Completed -= Entry_Completed; } }