Keyboard does not switch to default keyboard after sending a message #971
Description
On the most recent version available via cocoapods (7.0.2), if you send a message after switching to a non-default keyboard (i.e. number or emoji keyboard) the keyboard is left on the non-default keyboard. The behavior in iMessage is to switch back to the default keyboard after a message is sent. This can be addressed by calling:
[self.inputToolbar.contentView.textView resignFirstResponder];
[self.inputToolbar.contentView.textView setKeyboardType:UIKeyboardTypeDefault];
[self.inputToolbar.contentView.textView becomeFirstResponder];
However, this causes the collectionView to "bounce" when the keyboard is resigned then immediately becomes the first responder. This can be addressed by wrapping the above set of calls in:
[self.keyboardController endListeningForKeyboard];
//...call set keyboard code from above
[self.keyboardController beginListeningForKeyboard];
However, the keyboardController on JSQMessagesViewController is private, as well as the declaration that it conforms to the keyboardControllerDelegate, making it impossible to override the delegate functionality. I would like either:
a.) the ability to prevent the viewcontroller from listening to keyboard notifications from a subclass
b.) native behavior to switch the keyboard back to the default keyboard when the didPressSendButton: method is called
Personally I've solved this by making keyboardController a public property, then calling end/beginListening manually, but I am not sure this is the best solution, so I thought it best to raise an issue before a Pull Request.
Activity