Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Loading