diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Renderers/EditorEditText.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Android/Renderers/EditorEditText.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/EditorEditText.cs b/Xamarin.Forms.Platform.Android/Renderers/EditorEditText.cs index 4a6428eb..24273121 100644 --- a/Xamarin.Forms.Platform.Android/Renderers/EditorEditText.cs +++ b/Xamarin.Forms.Platform.Android/Renderers/EditorEditText.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(); - OnBackKeyboardPressed?.Invoke(this, EventArgs.Empty); - return true; + if (keyCode == Keycode.Back && e.Action == KeyEventActions.Down) + { + EventHandler handler = OnBackKeyboardPressed; + if (handler != null) + handler(this, EventArgs.Empty); + } + return base.OnKeyPreIme(keyCode, e); } public override bool RequestFocus(FocusSearchDirection direction, Rect previouslyFocusedRect) |