-
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
Fixes issue with on android with TextInput focus inside ScrollView #17892
Conversation
Generated by 🚫 dangerJS |
Having this fix merged would be really important for the app I'm currently developing. Any update? |
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.
@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
Any update on the progress of this merge request? |
Reviewed By: mdvacca Differential Revision: D7165823 fbshipit-source-id: e6d2a83bf9e089c67d69de6581d177bdf0d2ec4e
Summary: React Native had an underlying problem connecting to Firestore (Google's latest database) from Android devices. You can follow the issue [here](firebase/firebase-js-sdk#283). The main problem was in NetworkingModule.java. Please refer to section 3 of 4.5.6 in whatwg.org's guideline https://xhr.spec.whatwg.org/#dom-xmlhttprequest-send In this [video](https://www.youtube.com/watch?v=tILagf46ys8), I am showing how the react native behaved before adding the new fix and how it worked after the new fix added. The new fix starts at 50 seconds. [ANDROID] [BUGFIX] [FIRESTORE][XMLHttpRequest][ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java] - Fixes the connection to Firestore by following whatwg.org's XMLHttpRequest send() method Closes #17940 Differential Revision: D7173468 Pulled By: hramos fbshipit-source-id: 354d36f03d611889073553b93a7c43c6d4363ff3
Summary: To avoid crashing when there are 2 different renderers, let the Inspector be a bit lenient. Reviewed By: yungsters Differential Revision: D7175338 fbshipit-source-id: ee5f86252f090361e42b6e2a93ae56c4c83c8c53
Summary: Tightening these types. We can't type TextProp the same way yet because of something fishy in Flow: https://flow.org/try/#0KYDwDg9gTgLgBDAnmYcAqoYGUkBtUC8cA3gD4BQccAZhAHYwBiAhgLYCWuiAXHAM4wo7OgHMANJRr1s7AF7BedAK6sARsCgTSAXwDc5cqEiwEyVIwAiWRtJyJ8cImUm0GLDl14ChorXoNG0PBIKOiYdvgAClAQYI5wACQASsDMACYA8nRcADwJWAAWzCg5GCDYeMAAfFW6cAD09XAprBAAbqjJqZnZiHDMdGkIBagaMVBwIhDAfP0A7syIBgDG9AJwllgRChtWNgzb8cQu0u6cPHAA5LQQlxL+5Kt062UV9sAAasxQvK-b0bF4pttrogA Reviewed By: olegbl Differential Revision: D7165134 fbshipit-source-id: 2fd3de2af8bdc53231d59de71def1e6a7221aff7
Reviewed By: yungsters Differential Revision: D7176472 fbshipit-source-id: 35f499bdac6c089d5f45884f6f11ea539c8b7085
Reviewed By: yungsters Differential Revision: D7176652 fbshipit-source-id: 25b6f2e4f8397ba6f07b2913775b91af90b45750
Summary: These types were barely used and unnecessary. Reviewed By: yungsters Differential Revision: D7177287 fbshipit-source-id: 63cb6d3aae4889a92b2c23f0df864b5657e6e1ee
Summary: Android uses the name of the package, not the config, for the `isInstalled` check. Sending both parameters to `isInstalled` so we have a consistent API. <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> A bug was uncovered in the react-native link command where Android would not unlink because the wrong parameters were being sent to `isInstalled`. Successfully linked and unlinked `react-native-fs` on Windows and Mac. Jest tests pass. <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [CLI][BUGFIX][local-cli/link/link.js] - Fix issue with `isInstalled` check for Android [CLI][BUGFIX][local-cli/link/unlink.js] - Fix issue with `isInstalled` check for Android [CLI][BUGFIX][local-cli/link/ios/common/unregisterNativeModule.js] - Fix references to unregister implementations. Closes #18207 Differential Revision: D7180885 Pulled By: hramos fbshipit-source-id: 5f479cd9d7b1ebd8626b461e9dc1f22988e2c61f
Summary: There are a few important states that didn't reset correctly when reloading JS: * the RCTSurfaceStage was stuck at all bits enabled, hence no further stage change happened (even though the state "reset" to `RCTSurfaceStageBridgeDidLoad`) * the RCTSurfaceView didn't get recreated, because the _view ivar was never cleared * similarly, the _touchHandler ivar attached to the _view was never re-setup --> all touches after JS reload were dropped before this diff Reviewed By: mmmulani Differential Revision: D7178038 fbshipit-source-id: ba49bc205f8bf43842471b7ab748cef8549ea212
Summary: This type is being used in many places where a much simpler type is often better. In a real pinch this type can still be accessed as so: ``` function returnsStyleSheet( ): $Call<typeof StyleSheet.create, *> { return StyleSheet.create({ root: { background: 'white', } }) } returnsStyleSheet().foo // foo doesn't exist returnsStyleSheet().root // okay ``` Reviewed By: yungsters Differential Revision: D7178524 fbshipit-source-id: 3c0ed03486ca00f1e287261e402fd47807f1fc3d
Summary: We want to rename these types to be more clear what they are actually for. I did this with a find and replace: ``` import type {StyleProp} from 'StyleSheet'; ``` to ``` import type {DangerouslyImpreciseStyleProp} from 'StyleSheet'; ``` and `StyleProp` to `DangerouslyImpreciseStyleProp`. Reviewed By: yungsters Differential Revision: D7178609 fbshipit-source-id: 32952e0c3a8b6aceef306f1f3c18844feb18f1aa
Summary: Migrating everything to import from StyleSheet instead of StyleSheetTypes. Search and replaced ``` import type {StyleObj} from 'StyleSheetTypes'; ``` to ``` import type {DangerouslyImpreciseStyleProp} from 'StyleSheet'; ``` and then replacing `StyleObj` with `DangerouslyImpreciseStyleProp` and fixing up the remaining flow errors by hand. Reviewed By: yungsters Differential Revision: D7184077 fbshipit-source-id: b8dabb9d48038b5a997ab715687300bad57aa9d4
Reviewed By: BYK Differential Revision: D7181876 fbshipit-source-id: a1b567303b8024b832bf43dd6be56ccebffaf39c
Reviewed By: yungsters Differential Revision: D7185815 fbshipit-source-id: 897ae37af3f03aa1408f020bcc7e61004d4dbc0d
Reviewed By: kostiakoval Differential Revision: D7174480 fbshipit-source-id: 38af8e6e94cb8cdf6aa551d9df1b3e16543387e5
…rations Reviewed By: shergin Differential Revision: D7162911 fbshipit-source-id: 3e303020dafdccc51f52c3359a7054dc8a787978
Reviewed By: mdvacca Differential Revision: D7185836 fbshipit-source-id: 726e6e6792f1f3971c2f7de9bb83ff888815220d
Reviewed By: mdvacca Differential Revision: D7185838 fbshipit-source-id: f775f5668ccff3b311c95a0bdd37a420ec64b7d4
Reviewed By: yungsters Differential Revision: D7185837 fbshipit-source-id: e8efc22ac0af092dbc1fdf616b0b3f111390dd5d
Reviewed By: achen1 Differential Revision: D7435365 fbshipit-source-id: 3e04b3252945112cf0c7206b0e6fb63535499eb9
Summary: Setting `textContentType` will provide the keyboard and system with semantic meaning for inputs. Should enable password/username autofill in apps running on iOS 11+ as demonstrated here: https://developer.apple.com/videos/play/wwdc2017/206/ Also gives you the ability to disable autofill by setting `textContentType="none"`: https://stackoverflow.com/questions/48489479/react-native-disable-password-autofill-option-on-ios-keyboard Adding `textContentType` equal to `username` or `password` should give you an autofill-bar over the keyboard which will let you fill in values from the device Keychain: ![image](https://user-images.githubusercontent.com/4932625/37848513-b2170490-2ed4-11e8-85bf-895823d4f98a.png) Setting the appropriate `textContentType` will fill in the correct value in the `TextInput`. I have only been able to get this to work on device, and not simulator. Usage: ```jsx <TextInput value={this.state.username} onChangeText={this.setUserName} textContentType="username" /> ``` ```jsx <TextInput value={this.state.password} onChangeText={this.setPassword} secureTextEntry={true} textContentType="password" /> ``` To disable: ```jsx <TextInput value={this.state.password} onChangeText={this.setPassword} secureTextEntry={true} textContentType="none" /> ``` This will set `textContentType` to an empty string: https://stackoverflow.com/a/46474180/5703116 <!-- Does this PR require a documentation change? Create a PR at https://github.com/facebook/react-native-website and add a link to it here. --> Docs PR coming up. [IOS] [MINOR] [TextInput] - Added `textContentType` prop for iOS 10+. Will enable password autofill for iOS 11+. Closes #18526 Differential Revision: D7469630 Pulled By: hramos fbshipit-source-id: 852a9749be98d477ecd82154c0a65a7c084521c1
Summary: `RCTSubtractionAnimatedNode.m` was not added to the tvOS build of RCTAnimation... this PR fixes the issue. tvOS CI should succeed after this change. [TVOS] [BUGFIX] [RCTAnimation] Fix build breakage Closes #18663 Differential Revision: D7483586 Pulled By: hramos fbshipit-source-id: 521152d829b064b7002dc8651a0558373c5505f8
Reviewed By: Hypuk Differential Revision: D7385541 fbshipit-source-id: 287d3f4d681046f740ed0552e00a2249c3803a0b
Import failed due to a conflict. The PR needs to be rebased. |
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.
Please rebase so we can import this cleanly.
…etter of dimensions Reviewed By: emilsjolander Differential Revision: D7302453 fbshipit-source-id: e002a1ddd75bfc6fe142a7275e7913c064972e16
Reviewed By: emilsjolander Differential Revision: D7302651 fbshipit-source-id: 53e3b4c9627207a379f927b1f3485e36a9c70601
Reviewed By: emilsjolander Differential Revision: D7303460 fbshipit-source-id: 41ec0076ace621ec1a5bdbab00b72eea57780fff
Reviewed By: emilsjolander Differential Revision: D7304090 fbshipit-source-id: cbec03a9367cf34976d083ad475d4da0b736e6d2
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> In react-native v0.52 this warning shows: ``` "RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`". ``` This removes the warning by implementing `requiresMainQueueSetup` on RCTImageLoader * Create new react-native project * Enable Remote JS Debugging * Should see no warning regarding RCTImageLoader requiring main queue setup <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [IOS] [BUGFIX] [Libraries/Image/RCTImageLoader.m] - Implements `requiresMainQueueSetup` Closes #17679 Reviewed By: shergin Differential Revision: D7159601 Pulled By: fkgozali fbshipit-source-id: e17bae67f4005d2c9ddd0d3701506521f3cac152
Summary: Currrent(0.54-stable) root path in RNTester gradle config would cause a failure when trying to compile a release version for RNTester: ``` module.js:545 throw err; ^ Error: Cannot find module ’TheParentDirectoryOfCurrentRepo/local-cli/cli.js' at Function.Module._resolveFilename (module.js:543:15) at Function.Module._load (module.js:470:25) at Function.Module.runMain (module.js:690:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:666:3 :RNTester:android:app:bundleReleaseJsAndAssets FAILED ``` [ANDROID] [INTERNAL] [RNTester] - Fix wrong root path in RNTester gradle config Closes #18553 Differential Revision: D7488301 Pulled By: mdvacca fbshipit-source-id: b49a01820957eb77daeca9c0949f662b668f2bd1
Im giving up on this. I literally added 25 characters in one file... And it fixes a breaking bug, but the whole process of getting this merged is crazy.. |
I apologize for the friction. Due to some changes to the internal repo that serves as the source of truth, any PRs opened prior to ~Early February 2018 need to be rebased. It looks like you had some trouble doing this in this PR. It might be easier to pull from master and create a fresh fork, then apply your small change. |
Landed in #18785 |
@@ -90,6 +90,8 @@ type Props = { | |||
|
|||
class InputAccessoryView extends React.Component<Props> { | |||
render(): React.Node { | |||
console.warn('<InputAccessoryView> is not supported on Android yet.'); |
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.
@PeteTheHeat, shouldn't this warning be constrained to only occur on Android?
I have the same issue with FlatList no matter what I specify for 'keyboardDismissMode'. |
Summary: This sync includes the following changes: - **[57333ca33](facebook/react@57333ca33 )**: Show first component stack in context warning (#17922) //<Dan Abramov>// - **[cf0081263](facebook/react@cf0081263 )**: Upgrade to jest 25 (#17896) //<Simen Bekkhus>// - **[6faf6f5eb](facebook/react@6faf6f5eb )**: Update to flow 0.97 (#17892) //<Nicolas Gallagher>// - **[81e30c7ff](facebook/react@81e30c7ff )**: Remove unused modules from legacy event responders (#17907) //<Nicolas Gallagher>// - **[3c713d513](facebook/react@3c713d513 )**: chore: update to latest release of babel (#17897) //<Simen Bekkhus>// - **[3b3decf87](facebook/react@3b3decf87 )**: add warning when owner and self are different for string refs (#17864) //<Luna Ruan>// - **[6c00c5bba](facebook/react@6c00c5bba )**: Update to flow-bin@0.89 (#17842) //<Nicolas Gallagher>// - **[cf7a0c24d](facebook/react@cf7a0c24d )**: Remove dynamic GKs for selective/train (#17888) //<Sebastian Markbåge>// - **[c322f5913](facebook/react@c322f5913 )**: Add unstable_renderSubtreeIntoContainer and unstable_createPortal feature flags (#17880) //<Dominic Gannaway>// - **[f2fd484af](facebook/react@f2fd484af )**: Add React.createFactory() deprecation warning (#17878) //<Dominic Gannaway>// - **[0c04acaf8](facebook/react@0c04acaf8 )**: Remove FB specific build (#17875) //<Sebastian Markbåge>// - **[9fd760ce7](facebook/react@9fd760ce7 )**: Add disable <textarea/> children flag (#17874) //<Dominic Gannaway>// - **[a209a97ed](facebook/react@a209a97ed )**: Add feature flag around React.createFactory (#17873) //<Dominic Gannaway>// - **[95bd7aad7](facebook/react@95bd7aad7 )**: Remove renderPhaseUpdates Map (#17625) //<Andrew Clark>// - **[b43b36dd9](facebook/react@b43b36dd9 )**: Remove ReactInstanceMap_DO_NOT_USE shim (#17861) //<Dominic Gannaway>// - **[9e075d16b](facebook/react@9e075d16b )**: [react-interactions] Remove deprecated Scope APIs + update Focus components/docs (#17859) //<Dominic Gannaway>// - **[b6173e6](facebook/react@b6173e643 )**: [react-interactions] Add DO_NOT_USE to Scope methods (#17835) //<Dominic Gannaway>// - **[f4ca909e0](facebook/react@f4ca909e0 )**: react-refresh@0.7.2 //<Dan>// - **[255d9ac5f](facebook/react@255d9ac5f )**: [Fresh] Fix edge case with early function call (#17824) //<Dan Abramov>// - **[d8570ec6e](facebook/react@d8570ec6e )**: Create ReactFabric.stopSurface and use that for bridgeless mode binding (#16164) //<Emily>// - **[5d6129b5d](facebook/react@5d6129b5d )**: Update ReactSuspenseList-test.internal.js (#17034) //<Ganapati V S>// - **[3ac81a57f](facebook/react@3ac81a57f )**: Update create-react-app note for eslint-plugin-react-hooks (#16982) //<Tao>// - **[e70672149](facebook/react@e70672149 )**: Update Flow to 0.84 (#17805) //<Dan Abramov>// - **[b979db4e7](facebook/react@b979db4e7 )**: Bump Prettier (#17811) //<Dan Abramov>// Changelog: [General][Changed] - React Native sync for revisions 19f6fe1...241c446 Reviewed By: yungsters Differential Revision: D19623180 fbshipit-source-id: 3cdecb33aa66dfc21a2b347bf7f63a5b27fcf6ea
Summary: This sync includes the following changes: - **[57333ca33](facebook/react@57333ca33 )**: Show first component stack in context warning (facebook#17922) //<Dan Abramov>// - **[cf0081263](facebook/react@cf0081263 )**: Upgrade to jest 25 (facebook#17896) //<Simen Bekkhus>// - **[6faf6f5eb](facebook/react@6faf6f5eb )**: Update to flow 0.97 (facebook#17892) //<Nicolas Gallagher>// - **[81e30c7ff](facebook/react@81e30c7ff )**: Remove unused modules from legacy event responders (facebook#17907) //<Nicolas Gallagher>// - **[3c713d513](facebook/react@3c713d513 )**: chore: update to latest release of babel (facebook#17897) //<Simen Bekkhus>// - **[3b3decf87](facebook/react@3b3decf87 )**: add warning when owner and self are different for string refs (facebook#17864) //<Luna Ruan>// - **[6c00c5bba](facebook/react@6c00c5bba )**: Update to flow-bin@0.89 (facebook#17842) //<Nicolas Gallagher>// - **[cf7a0c24d](facebook/react@cf7a0c24d )**: Remove dynamic GKs for selective/train (facebook#17888) //<Sebastian Markbåge>// - **[c322f5913](facebook/react@c322f5913 )**: Add unstable_renderSubtreeIntoContainer and unstable_createPortal feature flags (facebook#17880) //<Dominic Gannaway>// - **[f2fd484af](facebook/react@f2fd484af )**: Add React.createFactory() deprecation warning (facebook#17878) //<Dominic Gannaway>// - **[0c04acaf8](facebook/react@0c04acaf8 )**: Remove FB specific build (facebook#17875) //<Sebastian Markbåge>// - **[9fd760ce7](facebook/react@9fd760ce7 )**: Add disable <textarea/> children flag (facebook#17874) //<Dominic Gannaway>// - **[a209a97ed](facebook/react@a209a97ed )**: Add feature flag around React.createFactory (facebook#17873) //<Dominic Gannaway>// - **[95bd7aad7](facebook/react@95bd7aad7 )**: Remove renderPhaseUpdates Map (facebook#17625) //<Andrew Clark>// - **[b43b36dd9](facebook/react@b43b36dd9 )**: Remove ReactInstanceMap_DO_NOT_USE shim (facebook#17861) //<Dominic Gannaway>// - **[9e075d16b](facebook/react@9e075d16b )**: [react-interactions] Remove deprecated Scope APIs + update Focus components/docs (facebook#17859) //<Dominic Gannaway>// - **[b6173e6](facebook/react@b6173e643 )**: [react-interactions] Add DO_NOT_USE to Scope methods (facebook#17835) //<Dominic Gannaway>// - **[f4ca909e0](facebook/react@f4ca909e0 )**: react-refresh@0.7.2 //<Dan>// - **[255d9ac5f](facebook/react@255d9ac5f )**: [Fresh] Fix edge case with early function call (facebook#17824) //<Dan Abramov>// - **[d8570ec6e](facebook/react@d8570ec6e )**: Create ReactFabric.stopSurface and use that for bridgeless mode binding (facebook#16164) //<Emily>// - **[5d6129b5d](facebook/react@5d6129b5d )**: Update ReactSuspenseList-test.internal.js (facebook#17034) //<Ganapati V S>// - **[3ac81a57f](facebook/react@3ac81a57f )**: Update create-react-app note for eslint-plugin-react-hooks (facebook#16982) //<Tao>// - **[e70672149](facebook/react@e70672149 )**: Update Flow to 0.84 (facebook#17805) //<Dan Abramov>// - **[b979db4e7](facebook/react@b979db4e7 )**: Bump Prettier (facebook#17811) //<Dan Abramov>// Changelog: [General][Changed] - React Native sync for revisions 19f6fe1...241c446 Reviewed By: yungsters Differential Revision: D19623180 fbshipit-source-id: 3cdecb33aa66dfc21a2b347bf7f63a5b27fcf6ea
Motivation
Fixes #16635
the issue is a little serious if you use a scrollview which contains textinput, you will never get a chance to input something since keyboard will always be dismissed because of on-drag event if your scroll-view use the property: keyboardDismissMode ='on-drag'
Test Plan
verify the issue #16635 and tested this fix worked
Release Notes
[ANDROID] [BUGFIX] [ScrollView] - Check that isTouching is also set when dismissing keyboard with on-drag android.