@@ -445,7 +445,17 @@ extension MessageInputBar: UITextViewDelegate {
445445 self . textViewFirstResponder ? ( true )
446446 }
447447
448+ public func endSuperScroll( ) {
449+ if let list = self . superview? . viewWithTag ( 111 ) as? UITableView {
450+ let indexPath = IndexPath ( row: list. numberOfRows ( inSection: 0 ) - 1 , section: 0 )
451+ if indexPath. row >= 0 {
452+ list. scrollToRow ( at: indexPath, at: . none, animated: false )
453+ }
454+ }
455+ }
456+
448457 @objc private func keyboardWillShow( notification: Notification ) {
458+ self . endSuperScroll ( )
449459 if !self . inputField. isFirstResponder {
450460 return
451461 }
@@ -455,7 +465,7 @@ extension MessageInputBar: UITextViewDelegate {
455465 guard let frame = notification. chat. keyboardEndFrame else { return }
456466 guard let duration = notification. chat. keyboardAnimationDuration else { return }
457467 self . keyboardHeight = frame. height
458- if frame. height < 200 {
468+ if frame. height < 216 {
459469 return
460470 }
461471 self . attachment. isSelected = false
@@ -482,6 +492,7 @@ extension MessageInputBar: UITextViewDelegate {
482492
483493 @objc open func showEmojiKeyboard( ) {
484494 self . emoji? . isUserInteractionEnabled = true
495+ self . endSuperScroll ( )
485496 self . collapsedState = false
486497 if self . rightView. isSelected {
487498 self . keyboardHeight = 256 + BottomBarHeight
@@ -529,6 +540,7 @@ extension MessageInputBar: UITextViewDelegate {
529540 @objc open func showExtensionMenus( ) {
530541 self . collapsedState = false
531542 self . extensionMenus. isUserInteractionEnabled = true
543+ self . endSuperScroll ( )
532544 if !self . subviews. contains ( self . extensionMenus) {
533545 self . addSubview ( self . extensionMenus)
534546 }
0 commit comments