-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Align multi-line TextInput onSubmitEditing behavior #29177
Align multi-line TextInput onSubmitEditing behavior #29177
Conversation
Aligns behavior to be consistent with Android and the documentation. `onSubmitEditing` should not be called when `blurOnSubmit=false`.
Base commit: ff69028 |
Base commit: ff69028 |
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.
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
IDK. Where exactly the documentation says that? I only found this:
To me, it does not say anything about the case where Do we have any motivation for this use-case? Maybe we should change Android? We have to unify the behavior, that's for sure. |
My interpretation of "instead of`" in the documentation describes the opposite case, i.e.:
If you're asking me what I think should be the correct behaviour, I think Regardless, this change aligns iOS with Android. Right now, macOS is aligned with Android (as of v0.61.49). If you think we should change the behaviour to something that is more useful, I am happy to do that but I need to know what that something is 😄 |
Oh, IDK, it's a tough choice. |
@shergin: This is what I'm thinking:
In all cases, pressing Shift+Enter will always insert a newline, and will neither submit nor blur.
I think this matches most chat clients and forms that I've interacted with. What do you think? |
This pull request was successfully merged by @tido64 in 521b167. When will my fix make it into a release? | Upcoming Releases |
Summary: This is a revert of D22488870 (521b167). (#29177) We have to revert it because we realized that it's a breaking change without a very good reason. We have to figure out a better way to unify platform behaviors. Changelog: [iOS][Fixed] - Reverted recent change in TextInput (#29177) Reviewed By: fkgozali Differential Revision: D24200517 fbshipit-source-id: af0e561a6b8d9ade487be6b197a5d79d326442b6
Summary: This is a revert of D22488870 (facebook@521b167). (facebook#29177) We have to revert it because we realized that it's a breaking change without a very good reason. We have to figure out a better way to unify platform behaviors. Changelog: [iOS][Fixed] - Reverted recent change in TextInput (facebook#29177) Reviewed By: fkgozali Differential Revision: D24200517 fbshipit-source-id: af0e561a6b8d9ade487be6b197a5d79d326442b6
Summary
Aligns behavior to be consistent with Android and the documentation.
onSubmitEditing
should not be called whenblurOnSubmit=false
.Changelog
[iOS] [Fixed] - Align multi-line TextInput onSubmitEditing behavior
Test Plan