We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21b7319 commit 4d5dbbcCopy full SHA for 4d5dbbc
1 file changed
ios/EnrichedTextInputView.mm
@@ -1722,12 +1722,15 @@ - (void)anyTextMayHaveBeenModified {
1722
}
1723
1724
if (![textView.textStorage.string isEqualToString:_recentInputString]) {
1725
-
1726
- // emit onChangeText event
1727
auto emitter = [self getEventEmitter];
1728
if (emitter != nullptr) {
+ // set the recent input string only if the emitter is defined
+ // to properly emit the initial onChangeText event
1729
+ // as anyTextMayHaveBeenModified also runs before the emitter's
1730
+ // initialization
1731
_recentInputString = [textView.textStorage.string copy];
1732
1733
+ // emit onChangeText event
1734
if (_emitTextChange) {
1735
// emit string without zero width spaces
1736
NSString *stringToBeEmitted = [[textView.textStorage.string
0 commit comments