Skip to content

Commit a849524

Browse files
committed
Fix issues discovered in InputBarAccessoryView
1 parent 86a4ef3 commit a849524

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Plugins/AutocompleteManager/AutocompleteManager.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ open class AutocompleteManager: NSObject, InputPlugin, UITextViewDelegate, UITab
312312
if appendSpaceOnCompletion {
313313
newAttributedText.append(NSAttributedString(string: " ", attributes: typingTextAttributes))
314314
}
315+
// Set to blank string to stop system autocomplete from clobbering replacement
316+
textView.attributedText = NSAttributedString()
317+
315318
textView.attributedText = newAttributedText
316319
}
317320

Sources/MessageInputBar.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ open class MessageInputBar: UIView {
484484
textViewHeightAnchor?.isActive = true
485485
inputTextView.isScrollEnabled = true
486486
isOverMaxTextViewHeight = true
487+
inputTextView.layoutIfNeeded()
487488
}
488489
inputTextViewHeight = maxTextViewHeight
489490
} else {

0 commit comments

Comments
 (0)