Skip to content
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

[ViewPagerAndroid] Incorrect behaviour of Text with onPress #18097

Closed
Jpunt opened this issue Feb 26, 2018 · 4 comments
Closed

[ViewPagerAndroid] Incorrect behaviour of Text with onPress #18097

Jpunt opened this issue Feb 26, 2018 · 4 comments
Labels
Bug Help Wanted :octocat: Issues ideal for external contributors. Resolution: Locked This issue was locked by the bot.

Comments

@Jpunt
Copy link

Jpunt commented Feb 26, 2018

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 8.2.1
Yarn: 0.27.5
npm: 5.3.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.2.0 => 16.2.0
react-native: ^0.53.3 => 0.53.3

Steps to Reproduce

  • Render a ViewPagerAndroid with a nested Text
  • Add an onPress to the deepest Text
  • Press the text
  • Swipe away
  • Release the text

Expected Behavior

The onPress should not be fired.

Actual Behavior

The onPress is fired.

Reproducible Demo

https://snack.expo.io/@jpunt/viewpagerandroid-bug

viewpagerandroid

@kholiavko-roman
Copy link

kholiavko-roman commented Mar 19, 2018

The same problem if put Text wit selectable prop inside - the text cannot be selected.

<Text selectable>
 Test text
</Text> 

On the latest rn - 0.54.2 - issue still present.

@kholiavko-roman
Copy link

I found that this problem is because of collapsable: false in ViewPagerAndroid.android.js
Without this prop I cant select text inside ViewPagerAndroid, but in this case I cannot markup my page.
I try to fix it, but I didn't found a solution.

@hramos, @janicduplessis Guys, any idea ? We very need this functionality in near time.

@hramos
Copy link
Contributor

hramos commented Mar 20, 2018

Sorry, nothing to add. If this were a regression, it might warrant looking a bit more into it. This seems like something where two components do not work necessarily as expected when used in a particular way together. These types of issues we leave to the community to investigate and address if there is a need.

@cpojer
Copy link
Contributor

cpojer commented Feb 15, 2019

This issue has been moved to callstack/react-native-pager-view#11.

@cpojer cpojer closed this as completed Feb 15, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Feb 15, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Help Wanted :octocat: Issues ideal for external contributors. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants