Skip to content

Inconsistent behavior for TouchableOpacity without onPress callback between desktop browsers and Safari iOS #888

@MoOx

Description

@MoOx

Do you want to request a feature or report a bug?

bug

What is the current behavior?

<TouchableOpacity> without onPress is still capturing interaction on iPhone.

  1. Go to https://toothsome-camera.glitch.me with a desktop browser (Safari macOS, Firefox, Chrome)
  2. Click on the text
  3. See the alert "it works"
  4. Repeat with an iPhone or iOS Simulator, you won't see the alert

What is the expected behavior?

Consistent behavior. (I don't care if TouchableOpacity capture the click/press without onPress defined, I would have noticed in my browser :))

Note that I used TouchableOpacity without onPress to benefit of the opacity effect during a click for a website. The child is actually a <Link that have its own onPress.

Environment (include versions). Did this work in previous versions?

  • OS: macOS
  • Device: Macbook/iPhone X
  • Browser: Safari macOS / Safari iOS
  • React Native for Web (version): 0.1.0 and 0.5.4 are affected
  • React (version): 16.3.0 (and 16.2.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions