-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Touch/Mouse Input Will Not Leak To Child Components of ScrollView After Focus is in TextInput (Since 0.62) #5867
Comments
Confirmed the regression started with ae37f8e which was the upgrade to 0.62. In the above case, the ScrollView sees onResponderGrant instead of the TouchableHighlight. The responder state machine is controlled by upstream JS in RN, depending on touchStart, touchEnd, and seemingly some other factors. Confirmed that in the repro case, we still correctly send touchStart from native using the react tag for TouchableHighlight instead of the ScrollView. |
ScrollResponder has some logic to take precedent over nested views if their is a TextInput focused and keyboardPersistTaps is undefined or never https://github.com/facebook/react-native/blob/0.62-stable/Libraries/Components/ScrollResponder.js#L153-L243 This is what's triggering the logic. Debugging to figure out why we weren't hitting it before. |
We saw the behavior change because the 0.62 merge fixed the implementation of |
…l Keyboard Fixes microsoft/react-native-windows#5867 ScrollResponder has logic so that the first tap exiting out of a soft keyboard is captured instead of leaking to its children. This state is checked by testing if `TextInputState.currentlyFocusedInput()` is non-null. This also fires in cases a soft keyboard is not present (e.g. on Desktop where a physical keyboard is in use). This presents to users as clicks/taps not being registered when moving from a TextInput to something esle. Instead of checking TextInputState to see if the softKeyboard is open, check `this.keyboardWillOpenTo`, which is tied to keyboard open and close events. Validated that on react-native-windows, ScrollView will capture responder events when tapped and a soft-keyboard is open, but will not capture events when clicking from a TextView to a child of a ScrollView and no soft keyboard is open.
…eing Eaten See microsoft#5867 This backports the upstream change made in facebook/react-native#29798 to older versions of react-native Windows. Not going to bother to add the patching to the master branch, since we will pull in the fix automatically before 0.64. Validates the issue no longer repros after the change in the multicolumn flatlist example.
…eing Eaten See microsoft#5867 This backports the upstream change made in facebook/react-native#29798 to older versions of react-native-windows. Not going to bother to add the patching to the master branch, since we will pull in the fix automatically before 0.64. Validates the issue no longer repros after the change in the multicolumn flatlist example.
Need to also check if this impacts NetUI. Looking through everything again, I think it may run into the same problem, since TextInputState should be correctly wired now. |
This is a bit worse than previously known. @DrewHiggins reached out and it was realized that this bug interacts badly with |
Going to try to upstream again soon, but this one might be worth bringing a fix back to 0.63 for if it sticks upstream, since it's impacting multiple partners. Though both have workarounds. |
Adam Gorman(adamgor) and I are also encountering this issue. |
Chatted offline. Will hear back on whether the |
Removing "Partner: Office" since Stellar is no longer effected, but Garrison + Stream are both effected. Garrison has a workaround they're happy with, and there wasn't concern of a delayed upstream release. Stream still validating the workaround. |
Facebook also impacted, and Stream was having some issues getting the workaround applied. Going back to the stance of us potentially wanting to be a bit aggressive and bring this back to 0.63, since this seems to be impacting many teams. |
Fix is in PR to RN core, pretty bad UX; waiting to bake the fix in FB before backporting to 0.63 |
Adding link to PR referenced above: facebook/react-native#30374 |
Fixes microsoft#5867 Original PR in core: facebook/react-native#30374 This has been requested by enough folks to make sense to backport to 0.63. The upstream PR has stayed in FB master for a few weeks, and will be cherry-picked into 0.64 upstream, so this change only exists in 0.63.
* Fix Taps/Clicks Being Eaten in 0.63 Fixes #5867 Original PR in core: facebook/react-native#30374 This has been requested by enough folks to make sense to backport to 0.63. The upstream PR has stayed in FB master for a few weeks, and will be cherry-picked into 0.64 upstream, so this change only exists in 0.63. * Change files
…l Keyboard (facebook#29798) Summary: Fixes microsoft/react-native-windows#5867 ScrollResponder has logic so that the first tap exiting out of a soft keyboard is captured instead of leaking to its children. This state is checked by testing if `TextInputState.currentlyFocusedInput()` is non-null. This also fires in cases a soft keyboard is not present (e.g. on Desktop where a physical keyboard is in use). This presents to users as clicks/taps not being registered when moving from a TextInput to something esle. Instead of checking TextInputState to see if the softKeyboard is open, check `this.keyboardWillOpenTo`, which is tied to keyboard open and close events. ## Changelog [General] [Fixed] - Prevent ScrollView From Stealing Responder Capture When Using Physical Keyboard Pull Request resolved: facebook#29798 Test Plan: Validated that on react-native-windows, ScrollView will capture responder events when tapped and a soft-keyboard is open, but will not capture events when clicking from a TextView to a child of a ScrollView and no soft keyboard is open. Reviewed By: kacieb Differential Revision: D23426786 Pulled By: TheSavior fbshipit-source-id: 7138ef0bc4508aaec5531f455b022b105b5d858a
From @KAnder425
The text was updated successfully, but these errors were encountered: