[V2] scrollEnabled set to false brakes all touch events
See original GitHub issueBug
If scrollEnabled of ViewPager is set to false on iOS content of initial page inside native view pager stops getting all touch events.
Environment info
React native info output:
React Native Environment Info:
System:
OS: macOS 10.15
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 2.39 GB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 7, 8, 9
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-16 | Intel x86 Atom, android-18 | Google APIs Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-21 | Intel x86 Atom, android-22 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Android TV Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.59.10 => 0.59.10
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-rename: 2.4.1
Library version: 2.0.0
Steps To Reproduce
- Use native ViewPager component on iOS
- Set scrollEnabled to false
- Initial page of ViewPager stop receiving touch events
Describe what you expected to happen:
- Use native ViewPager component on iOS
- Set scrollEnabled to false
- Receive all touch events inside initial page while disabling scrolling of ViewPager
Reproducible sample code
let enableScroll = false
<ViewPager
style={{ flex: 1 }}
initialPage={0}
scrollEnabled={enableScroll}
>
<View style={{ flex: 1 }}>
// This button is not receiving touch event on iOS
<TouchableOpacity onPress={() => { enableScroll = true }}>
<Text>Test</Text>
</TouchableOpacity>
</View>
<View style={{ flex: 1 }} />
</ViewPager>
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
[V2] scrollEnabled set to false brakes all touch events · Issue #51
Bug If scrollEnabled of ViewPager is set to false on iOS content of initial page inside native view pager stops getting all touch...
Read more >ScrollView gesture recognizer eating all touch events
The idea is to tell the gesture recognizer to not swallow up the touch events. To do this you need to set singleTap's...
Read more >Hide keyboard in react-native - Stack Overflow
The ScrollView answer (set scrollable to false) isn't ideal, ... This might be an issue with react-native, but tap events only seem to...
Read more >Manage touch events in a ViewGroup - Android Developers
Handling touch events in a ViewGroup takes special care, because it's ... false // Do not intercept touch event, let the child handle...
Read more >Untitled
My wish list book club questions, Havet clothing, Subaru forester 2.0 xs 2009, ... How stack pointer works, Nokia 6303i games free download...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, @ivan3177 thanks for reporting this issue! Could you please check it on new 2.0? @ptrocki made a fix and it is merged already 🎉
Hey @ivan3177 , thank you for reporting this issue. I can reproduce it in example app. I will take a look onto it.