diff --git a/JSQMessagesViewController/Controllers/JSQMessagesKeyboardController.m b/JSQMessagesViewController/Controllers/JSQMessagesKeyboardController.m index fb9127fa1..f3f662a6c 100644 --- a/JSQMessagesViewController/Controllers/JSQMessagesKeyboardController.m +++ b/JSQMessagesViewController/Controllers/JSQMessagesKeyboardController.m @@ -285,10 +285,14 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N return; } + + // we should convert + CGRect keyboardEndFrameConverted = [self.contextView convertRect:newKeyboardFrame fromView:nil]; + // do not convert frame to contextView coordinates here // KVO is triggered during panning (see below) // panning occurs in contextView coordinates already - [self jsq_notifyKeyboardFrameNotificationForFrame:newKeyboardFrame]; + [self jsq_notifyKeyboardFrameNotificationForFrame:keyboardEndFrameConverted]; } } }