diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.mm b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.mm index 8fa5abfe2a8e..c0db129ee8c8 100644 --- a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.mm +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.mm @@ -311,6 +311,12 @@ - (instancetype)initWithFrame:(CGRect)frame _textView.editable = false; _textView.textContainerInset = UIEdgeInsetsZero; _textView.textContainer.lineFragmentPadding = 0; + // The shadow node already sized this view to fit every line. A container + // that tracks the frame can come out a fraction of a point shorter after + // pixel rounding, and TextKit then drops the last line. Size it by hand + // with unbounded height and let the view's bounds clip. + _textView.textContainer.widthTracksTextView = NO; + _textView.textContainer.heightTracksTextView = NO; _textView.delegate = self; // Chat text supports selection and contextual actions, but not drag-and-drop. _textView.textDragInteraction.enabled = NO; @@ -477,6 +483,7 @@ - (void)drawRect:(CGRect)rect } if (frameChanged) { _textView.frame = _view.frame; + _textView.textContainer.size = CGSizeMake(CGRectGetWidth(_view.frame), CGFLOAT_MAX); } // Text attachments have no native link element. Expose their existing runs