Skip to content

Commit

Permalink
Workaround for #1786 - Disable auto correction when running on the Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Oct 3, 2024
1 parent 2a2a823 commit 4f29821
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ private struct UITextViewWrapper: UIViewRepresentable {
textView.textContainer.lineFragmentPadding = 0.0
textView.textContainerInset = .zero
textView.keyboardType = .default

// AutoCorrection doesn't work properly when running on the Mac
// https://github.com/element-hq/element-x-ios/issues/1786
if ProcessInfo.processInfo.isiOSAppOnMac {
textView.autocorrectionType = .no
}

textView.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)

Expand Down

0 comments on commit 4f29821

Please sign in to comment.