-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Fixed onChange prop of textinput not be called in some cases #23687
Conversation
|
@ericlewis Oops, I'll see your |
@zhongwuzw my solution is only for multi line text inputs :( |
@ericlewis I give some my opinions in your |
Seems #23666 has been closed by @ericlewis , so we can review this implementation? 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole point to have those adapters is to call onChange only inside textInputDidChange
, so all trickiness must be consolidated there.
@shergin How about this way, to fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, using performSelector:withObject:afterDelay:
makes this fix unreliable.
Feel free to open a new one or reopen this one once we have a proper reliable fix for that, |
After some try, I think f032e7a is more suitable to solve this issue. |
@shergin Hi :) , the reason I reopened is I think |
|
||
_nativeEventCount++; | ||
|
||
if (_onChange) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not comfortable with calling onChange
inside textInputShouldChangeTextInRange
.
As I said previously, all quicky behavior should be implemented in delegate adapter classes.
I do want to fix this issue very very badly but we cannot sacrifice maintainability of the code for this (so we need to improve the quality of this to make it merged).
Summary
TextInput not call
onChange
prop in some cases, the reason istextInputDidChange
is not be called, for example select some text and click the text in keyboard predictive text.I have the
PR
#23472 , it fix the correction of_predictedText
, I think we need to fix that firstly 😂 .Changelog
[iOS] [Fixed] - Fixed onChange prop of textinput not be called in some cases
Test Plan
onChange
prop can be called when text changed.