diff --git a/KeyboardOverlap/KeyboardOverlap/KeyboardOverlap.Forms.Plugin.iOSUnified/KeyboardOverlapRenderer.cs b/KeyboardOverlap/KeyboardOverlap/KeyboardOverlap.Forms.Plugin.iOSUnified/KeyboardOverlapRenderer.cs index fdaf081..39870ac 100644 --- a/KeyboardOverlap/KeyboardOverlap/KeyboardOverlap.Forms.Plugin.iOSUnified/KeyboardOverlapRenderer.cs +++ b/KeyboardOverlap/KeyboardOverlap/KeyboardOverlap.Forms.Plugin.iOSUnified/KeyboardOverlapRenderer.cs @@ -17,7 +17,6 @@ public class KeyboardOverlapRenderer : PageRenderer NSObject _keyboardHideObserver; private bool _pageWasShiftedUp; private double _activeViewBottom; - private bool _isKeyboardShown; public static void Init () { @@ -58,7 +57,6 @@ void RegisterForKeyboardNotifications () void UnregisterForKeyboardNotifications () { - _isKeyboardShown = false; if (_keyboardShowObserver != null) { NSNotificationCenter.DefaultCenter.RemoveObserver (_keyboardShowObserver); _keyboardShowObserver.Dispose (); @@ -74,10 +72,9 @@ void UnregisterForKeyboardNotifications () protected virtual void OnKeyboardShow (NSNotification notification) { - if (!IsViewLoaded || _isKeyboardShown) + if (!IsViewLoaded) return; - _isKeyboardShown = true; var activeView = View.FindFirstResponder (); if (activeView == null) @@ -100,7 +97,6 @@ private void OnKeyboardHide (NSNotification notification) if (!IsViewLoaded) return; - _isKeyboardShown = false; var keyboardFrame = UIKeyboard.FrameEndFromNotification (notification); if (_pageWasShiftedUp) {