Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iOS 11 The First Time keyboard blocking the Entry #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class KeyboardOverlapRenderer : PageRenderer
NSObject _keyboardHideObserver;
private bool _pageWasShiftedUp;
private double _activeViewBottom;
private bool _isKeyboardShown;

public static void Init ()
{
Expand Down Expand Up @@ -58,7 +57,6 @@ void RegisterForKeyboardNotifications ()

void UnregisterForKeyboardNotifications ()
{
_isKeyboardShown = false;
if (_keyboardShowObserver != null) {
NSNotificationCenter.DefaultCenter.RemoveObserver (_keyboardShowObserver);
_keyboardShowObserver.Dispose ();
Expand All @@ -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)
Expand All @@ -100,7 +97,6 @@ private void OnKeyboardHide (NSNotification notification)
if (!IsViewLoaded)
return;

_isKeyboardShown = false;
var keyboardFrame = UIKeyboard.FrameEndFromNotification (notification);

if (_pageWasShiftedUp) {
Expand Down