Chatto
Chatto copied to clipboard
PhotosChatInputItem problem with hardware keyboard
Using an bluetooth / hardware keyboard in the simulator the PhotosChatInputItem calculates the height incorrectly. It starts out small and keeps shrinking upon each display until it's not even visible anymore.
From here, I click on the keyboard icon then back to the photo icon and here is what it looks like:
It seems fine if I only use the soft keyboard.
I may have figured this out. BasicChatInputBarPresenter has a method:
@objc
private func keyboardDidChangeFrame(_ notification: Notification) {
guard self.allowListenToChangeFrameEvents else { return }
guard let value = (notification as NSNotification).userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue else { return }
self.lastKnownKeyboardHeight = value.cgRectValue.height
}
If one us not using soft keyboard, lastKnownKeyboardHeight gets set to something really small and it seems to shrink randomly. Perhaps there should be some sort of minimum like 291 or 333 (two values I get with a soft keyboard.)
Hi, I just submitted pull request #533, which should fix this issue