diff --git a/Sources/Views/MessageInputBar.swift b/Sources/Views/MessageInputBar.swift index 7f1bb2a6..70418118 100644 --- a/Sources/Views/MessageInputBar.swift +++ b/Sources/Views/MessageInputBar.swift @@ -421,7 +421,7 @@ open class MessageInputBar: UIView { open func calculateIntrinsicContentSize() -> CGSize { let maxTextViewSize = CGSize(width: inputTextView.bounds.width, height: .greatestFiniteMagnitude) - var heightToFit = inputTextView.sizeThatFits(maxTextViewSize).height.rounded() + padding.top + padding.bottom + textViewPadding.bottom + topStackView.bounds.height + bottomStackView.bounds.height + var heightToFit = inputTextView.sizeThatFits(maxTextViewSize).height.rounded() if heightToFit >= maxHeight { if !isOverMaxTextViewHeight { textViewHeightAnchor?.isActive = true @@ -546,7 +546,6 @@ open class MessageInputBar: UIView { guard superview != nil else { return } topStackView.layoutIfNeeded() } - invalidateIntrinsicContentSize() } performLayout(animated) {