Skip to content

Commit

Permalink
Fix #3369 - Composer mention pills showing up as file icons on first …
Browse files Browse the repository at this point in the history
…use on iOS 18
  • Loading branch information
stefanceriu committed Oct 24, 2024
1 parent 2b82959 commit 665bdd1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ private struct UITextViewWrapper: UIViewRepresentable {
// Remember the selection if only the attributes have changed.
let selection = textView.attributedText.string == text.string ? textView.selectedTextRange : nil

// Fixes pill views not loading on the first attempt on iOS 18
// because the textContainers's superview comes in as nil
// https://github.com/element-hq/element-x-ios/issues/3369
_ = textView.layoutManager

textView.attributedText = text

// Re-apply the default font when setting text for e.g. edits.
Expand Down

0 comments on commit 665bdd1

Please sign in to comment.