This commit is contained in:
Kevin G Christiano 2020-05-12 15:59:06 -04:00
parent 64a99da609
commit c3e6b49b81

View File

@ -199,10 +199,7 @@ class TextViewEntryField: EntryField, UITextViewDelegate, ObservingTextFieldDele
/// Executes on UITextView.textDidEndEditingNotification
@objc func endInputing() {
resignFirstResponder()
if isValid {
showError = false
entryFieldContainer.bottomBar?.backgroundColor = UIColor.mvmBlack.cgColor
}
showError = !isValid
}
//--------------------------------------------------
@ -266,6 +263,7 @@ class TextViewEntryField: EntryField, UITextViewDelegate, ObservingTextFieldDele
text = model.text
uiTextViewDelegate = delegateObject?.uiTextViewDelegate
observingTextViewDelegate = delegateObject?.observingTextFieldDelegate
if let accessibilityText = model.accessibilityText {
accessibilityLabel = accessibilityText
@ -295,9 +293,10 @@ class TextViewEntryField: EntryField, UITextViewDelegate, ObservingTextFieldDele
if textView.isEditable {
FormValidator.setupValidation(for: model, delegate: delegateObject?.formHolderDelegate)
let observingDelegate = delegateObject?.uiTextViewDelegate ?? self
textView.inputAccessoryView = UIToolbar.getToolbarWithDoneButton(delegate: observingDelegate,
action: #selector(textView.dismissFieldInput))
setupTextViewToolbar()
// let observingDelegate = delegateObject?.uiTextViewDelegate ?? self
// textView.inputAccessoryView = UIToolbar.getToolbarWithDoneButton(delegate: observingDelegate,
// action: #selector(textView.dismissFieldInput))
if isSelected {
DispatchQueue.main.async {