-
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
fix: TextInput npe in #29452 on react native side #37302
Conversation
Base commit: 2b932c3 |
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
.../ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java
Outdated
Show resolved
Hide resolved
packages/react-native/ReactAndroid/src/main/res/views/textinput/values/styles.xml
Outdated
Show resolved
Hide resolved
After modifications above, I re-tested TextInputKeyProp.js with 101 changed to 1001 and TextInputExample.js. The npe problem doesn't occur and there no unexpected rendering effects, namely no side effects. textinput-npe-fixed.mp4 |
cc. @cortinico @NickGerleman: do you think this is good now? If yes, I can proceed reimporting this and try to land it. |
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.
LGTM 👍
@cipolleschi Is there anything else to do as the pr is approved and all checks have passed? |
@jcdhlzq nope, I'll import it and try to land this. |
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
we got a warning from "Fackbook Internal - Linter", but i cannot see it in details. |
Yep, that's on us. Internally, we use BUCK to build React Native and @cortinico and I are trying to figure out what is that dependency, fix it and landing. It could take a few days as I'm going to be at a Conference starting from later today. I'm sorry for the delay. |
I've re-sync the branch from upstream and now all checks have passed. @cipolleschi |
It seems that the checks are diffrent from those after you importing the pr. |
Yes, the internal linter runs only after importing the PR, so you updated the branch, but we need to reimport it to see if it passes. |
Shall we proceed with this PR this week? @cipolleschi |
Hi @jcdhlzq! I'm back from the conference, I'll try to land this as soon as we can. |
@cipolleschi merged this pull request in 98789e9. |
A similar fix was already reviewed by Joshua Gross #27782 (comment) in 2020, so I did not further investigate at that time. Thanks for fixing the issue! Relavant comment #17530 (comment) |
facebook#37302) Summary: Fix the TextInput npe in facebook#29452 on react native side because if it is just avoided on App side by changing themes may cause side effects. - [ANDROID] [FIXED] - Fix TextInput NPE. <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: facebook#37302 Test Plan: Thanks to Fabriziobertoglio1987's wok, the problem in facebook#29452 can be tested easily. This fixing works fine and causes no side effects. The following video shows the test result. And the number 101 has been changed to 1001 in RNTester/TextInputKeyProp.js when testing. https://user-images.githubusercontent.com/23273745/236796702-e61a6fa9-9935-4179-9c5f-e9370d543657.mp4 Reviewed By: javache Differential Revision: D45688987 Pulled By: cipolleschi fbshipit-source-id: 4e13c19c10ed53cfcead79e66ab2e232369317e0
Summary:
Fix the TextInput npe in #29452 on react native side because if it is just avoided on App side by changing themes may cause side effects.
Changelog:
Test Plan:
Thanks to Fabriziobertoglio1987's wok, the problem in #29452 can be tested easily. This fixing works fine and causes no side effects.
The following video shows the test result. And the number 101 has been changed to 1001 in RNTester/TextInputKeyProp.js when testing.
fix-textinput-npe.mp4