Include horizontal text view insets when computing message compose text bounding box
This commit is contained in:
parent
640a54af46
commit
2f40efb2fc
@ -2083,7 +2083,7 @@ extension ConversationInputToolbar: ConversationTextViewToolbarDelegate {
|
||||
|
||||
private func updateHeightWithTextView(_ textView: UITextView) {
|
||||
|
||||
let maxSize = CGSize(width: textView.width, height: CGFloat.greatestFiniteMagnitude)
|
||||
let maxSize = CGSize(width: textView.width - textView.textContainerInset.totalWidth, height: CGFloat.greatestFiniteMagnitude)
|
||||
var contentSize = textView.attributedText.boundingRect(with: maxSize, options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil).size
|
||||
contentSize.height += textView.textContainerInset.top
|
||||
contentSize.height += textView.textContainerInset.bottom
|
||||
|
||||
Loading…
Reference in New Issue
Block a user