From fec74d5e0de26314d832dd43812be04caf77df77 Mon Sep 17 00:00:00 2001 From: Andrew Overton Date: Tue, 18 Sep 2018 16:34:36 -0400 Subject: [PATCH] Send .editingChanged control event on clear button touch (#5144) --- components/TextFields/src/private/MDCTextInputCommonFundament.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/TextFields/src/private/MDCTextInputCommonFundament.m b/components/TextFields/src/private/MDCTextInputCommonFundament.m index 9766f9a8926..66d5de16963 100644 --- a/components/TextFields/src/private/MDCTextInputCommonFundament.m +++ b/components/TextFields/src/private/MDCTextInputCommonFundament.m @@ -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]; } } }