Skip to content

Commit

Permalink
Send .editingChanged control event on clear button touch (#5144)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewoverton committed Sep 18, 2018
1 parent 2fee136 commit fec74d5
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -596,9 +596,11 @@ - (void)clearButtonDidTouch {
[[NSNotificationCenter defaultCenter] postNotificationName:UITextViewTextDidChangeNotification
object:textField.textView];
} else if ([self.textInput isKindOfClass:[UITextField class]]) {
UITextField *textField = (UITextField *)self.textInput;
[[NSNotificationCenter defaultCenter]
postNotificationName:UITextFieldTextDidChangeNotification
object:self.textInput];
[textField sendActionsForControlEvents:UIControlEventEditingChanged];
}
}
}
Expand Down

0 comments on commit fec74d5

Please sign in to comment.