Issue Description:
When toggling between the system keyboard and a custom input view, the keyboard height reported in subsequent keyboard notifications becomes incorrect!!! specifically missing the predictive text/suggestion bar height.
Environment:
Device: iPhone 11
Expected keyboard height: 346pt
Actual reported height: 301pt (missing 45pt suggestion bar)
Reproduction Steps:
Present system keyboard → Height correctly reported as 346pt
Switch to custom input view → Custom view displayed
Switch back to system keyboard(no suggestion bar) → Height correctly reported as 301pt
Trigger keyboard frame change → Height still incorrectly reported as 301pt despite suggestion bar being visible
Expected Behavior:
Keyboard height should consistently include the suggestion bar height (346pt total).
Actual Behavior:
After switching from custom input view, keyboard height excludes suggestion bar height (301pt instead of 346pt).
key code
private func bindEvents() {
customTextField.toggleInputViewSubject.sink { [weak self] isShowingCustomInput in
guard let strongSelf = self else {
return
}
if isShowingCustomInput {
strongSelf.customTextField.inputView = strongSelf.customInputView
strongSelf.customInputView.frame = CGRect(x: 0, y: 0, width: strongSelf.view.frame.size.width, height: strongSelf.storedKeyboardHeight)
} else {
strongSelf.cusTextField.inputView = nil
}
strongSelf.customTextField.reloadInputViews()
strongSelf.customTextField.becomeFirstResponder()
}.store(in: &cancellables)
}
Selecting any option will automatically load the page