Digital ACT-191 ONEAPP-6682 story: Fix for the observed crash on removing last char when having char counter and exceeded limit.
This commit is contained in:
parent
af2c5cd368
commit
301ead7447
@ -300,12 +300,11 @@ extension TextArea: UITextViewDelegate {
|
||||
//The exceeding characters will be highlighted to help users correct their entry.
|
||||
if ((maxLength ?? 0) > 0) {
|
||||
if textView.text.count <= allowCharCount {
|
||||
highlightCharacterOverflow()
|
||||
|
||||
//setting the value and firing control event
|
||||
value = textView.text
|
||||
sendActions(for: .valueChanged)
|
||||
if (textView.text.count > (maxLength ?? 0)) {
|
||||
highlightCharacterOverflow()
|
||||
}
|
||||
} else {
|
||||
textView.text.removeLast()
|
||||
highlightCharacterOverflow()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user