Skip to content

React Native Android: An absolute positioned, TouchableOpacity outside of the bounds of its parent is not clickable #27232

Closed
@travisho-ensu

Description

@travisho-ensu

If I place a TouchableOpacity outside the bounds of its parent (using absolute positioning) only the portions of the TouchableOpacity which are inside the bounds of the parent are clickable. I think this is a bug because this can only be reproduced in Android, not iOS.
React Native version: 35.0.0

Steps To Reproduce

Here's a minimal code sample:
<View style={{height: 60, width: '100%', zIndex: 1}}> <TouchableOpacity onPress={() => console.log('pressed')} style={{position: 'absolute', zIndex: 2, backgroundColor: 'yellow', width: 100, height: 50, top: 70}} /> </View>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions