Skip to content

[Image] pointerEvents prop for Image component? #9834

Closed

Description

@joncursi

There are a variety of use cases where being able to specify pointerEvents on an image would solve zIndex / overlap / touch event complexities. Please see react-native-maps/react-native-maps#562 (comment) as an example.

It appears that wrapping the Image component in a

<View
  pointerEvents="none"
/>

doesn't seem to do the trick either.

Activity

  1. hey99xx commented on Oct 12, 2016

    @hey99xx

    Why wouldn't having <View pointerEvents="none"><Image/></View> not solve the issue? That should make the entire view untouchable. Even without it, a view itself does not have a touch interaction of its own, so a view like <View><Image/></View> should not need any pointer events as far as I understand. Can you share the code example that doesn't work?

    zIndex docs are here https://facebook.github.io/react-native/docs/layout-props.html#zindex . I'm not sure how pointerEvents relate to zIndex though.

  2. locked as resolved and limited conversation to collaborators on Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions