hideKeyboard can cause crash in some cases #34

Closed
slycrel opened this Issue Mar 27, 2013 · 2 comments

Comments

Projects
None yet
2 participants

slycrel commented Mar 27, 2013

We are using a split view controller that has the keyboard on it. If the keyboard is activated and the view with the keyboard is changed (but the keyboard control remains active), when hideKeyboard is called, self.keyboardActiveInput returns a deallocated text edit pointer.

Wrapping the 3 lines in hideKeyboard with:

if (self.keyboardActiveView)
{
...
}

This seems to fix this issue. Not sure if this is the best way to take care of this or if the object that self.keyboardActiveInput returns should be set to nil when "inputKeyboardDidHide" is called or something else.

Thanks for a great drop-in!

@danielamitay danielamitay added a commit that referenced this issue Mar 27, 2013

@danielamitay danielamitay Quick fix for Issue #34 6248e9f
Owner

danielamitay commented Mar 27, 2013

Indeed, inputKeyboardDidHide should be setting it to nil, but it's not being called due to the keyboard remaining active... Pushed a quick fix, will look into a more comprehensive fix.

slycrel commented Mar 27, 2013

Thanks for the quick update and response. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment