summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Renderers/EntryEditText.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Renderers/EntryEditText.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/EntryEditText.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/EntryEditText.cs b/Xamarin.Forms.Platform.Android/Renderers/EntryEditText.cs
index 5c0b7c0e..de03a414 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/EntryEditText.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/EntryEditText.cs
@@ -23,12 +23,13 @@ namespace Xamarin.Forms.Platform.Android
public override bool OnKeyPreIme(Keycode keyCode, KeyEvent e)
{
- if (keyCode != Keycode.Back || e.Action != KeyEventActions.Down)
- return base.OnKeyPreIme(keyCode, e);
-
- this.HideKeyboard();
- OnKeyboardBackPressed?.Invoke(this, EventArgs.Empty);
- return true;
+ if (keyCode == Keycode.Back && e.Action == KeyEventActions.Down)
+ {
+ EventHandler handler = OnKeyboardBackPressed;
+ if (handler != null)
+ handler(this, EventArgs.Empty);
+ }
+ return base.OnKeyPreIme(keyCode, e);
}
public override bool RequestFocus(FocusSearchDirection direction, Rect previouslyFocusedRect)