-
Notifications
You must be signed in to change notification settings - Fork 25.1k
TextInput order of events are inconsistent between iOS and Android #18221
Copy link
Copy link
Closed
Labels
BugComponent: TextInputRelated to the TextInput component.Related to the TextInput component.Platform: AndroidAndroid applications.Android applications.Platform: iOSiOS applications.iOS applications.Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Metadata
Metadata
Assignees
Labels
BugComponent: TextInputRelated to the TextInput component.Related to the TextInput component.Platform: AndroidAndroid applications.Android applications.Platform: iOSiOS applications.iOS applications.Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Type
Fields
Give feedbackNo fields configured for issues without a type.
TextInput event order are different for iOS and Android.
This inconsistency make certain operations hard to archive on Android:
change text eventbeforeselection change eventcan cause crash due to invalid selection.Environment
Tested on Expo 25.0.0/0.52.0, but original issue happen in 0.53.3 as well, Likely exist in 0.54.0
Expected Behavior
I think iOS order of events make the most sense and I hope Android can follow the suit.
Actual Behavior
The event in question are
onChangeText(),onSelectionChange()andonKeyPress().On iOS, the events are in the following order:
On Android, the events are in the following order:
Steps to Reproduce
https://snack.expo.io/Hk2qtCouf