diff --git a/Packages/ComposeUI/Sources/ComposeUI/Views/NewMainTextView.swift b/Packages/ComposeUI/Sources/ComposeUI/Views/NewMainTextView.swift index 9eb42ce7a4..eccd7f7716 100644 --- a/Packages/ComposeUI/Sources/ComposeUI/Views/NewMainTextView.swift +++ b/Packages/ComposeUI/Sources/ComposeUI/Views/NewMainTextView.swift @@ -19,6 +19,7 @@ struct NewMainTextView: View { var body: some View { NewMainTextViewRepresentable(value: $value, becomeFirstResponder: $becomeFirstResponder, handleAttachmentDrop: handleAttachmentDrop) + .frame(minHeight: Self.minHeight) .focused($focusedField, equals: .body) .modifier(FocusedInputModifier()) .overlay(alignment: .topLeading) { @@ -58,6 +59,10 @@ private struct NewMainTextViewRepresentable: UIViewRepresentable { .font: UIFontMetrics.default.scaledFont(for: .systemFont(ofSize: 20)), ] view.backgroundColor = nil + // on iOS 15, this is needed to prevent the text view from growing horizontally + if #unavailable(iOS 16.0) { + view.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) + } // view.layer.cornerRadius = 5 // view.layer.cornerCurve = .continuous