Fix keyboard return behavior in attachment approval.

pull/2/head
Matthew Chen 6 years ago
parent 660f35147f
commit a559b61056

@ -107,7 +107,6 @@ class AttachmentCaptionToolbar: UIView, UITextViewDelegate {
lazy var textView: UITextView = {
let textView = buildTextView()
textView.returnKeyType = .done
textView.scrollIndicatorInsets = UIEdgeInsets(top: 5, left: 0, bottom: 5, right: 3)
return textView
@ -190,15 +189,8 @@ class AttachmentCaptionToolbar: UIView, UITextViewDelegate {
}
}
// Though we can wrap the text, we don't want to encourage multline captions, plus a "done" button
// allows the user to get the keyboard out of the way while in the attachment approval view.
if text == "\n" {
textView.resignFirstResponder()
return false
} else {
return true
}
}
// MARK: - Helpers

@ -213,7 +213,6 @@ public class ImageEditorTextViewController: OWSViewController, VAlignTextViewDel
textView.isOpaque = false
// We use a white cursor since we use a dark background.
textView.tintColor = .white
textView.returnKeyType = .done
// TODO: Limit the size of the text?
// textView.delegate = self
textView.isScrollEnabled = true

Loading…
Cancel
Save