diff --git a/iOS/PostEditor/MultilineTextView.swift b/iOS/PostEditor/MultilineTextView.swift index 1c0aaee..ffffa18 100644 --- a/iOS/PostEditor/MultilineTextView.swift +++ b/iOS/PostEditor/MultilineTextView.swift @@ -17,17 +17,12 @@ private struct UITextViewWrapper: UIViewRepresentable { textField.delegate = context.coordinator textField.isEditable = true - textField.font = UIFont.preferredFont(forTextStyle: .body) textField.isSelectable = true textField.isUserInteractionEnabled = true textField.isScrollEnabled = false textField.backgroundColor = UIColor.clear textField.smartDashesType = .no - let font = textStyle - let fontMetrics = UIFontMetrics(forTextStyle: .largeTitle) - textField.font = fontMetrics.scaledFont(for: font) - if nil != onDone { textField.returnKeyType = .next } @@ -41,6 +36,10 @@ private struct UITextViewWrapper: UIViewRepresentable { uiView.text = self.text } + let font = textStyle + let fontMetrics = UIFontMetrics(forTextStyle: .largeTitle) + uiView.font = fontMetrics.scaledFont(for: font) + if uiView.window != nil && isEditing { DispatchQueue.main.async { uiView.becomeFirstResponder()