Skip to content

Pressable with border inside View with overflow: 'hidden' gets cut off on Android #3668

@gigobyte

Description

@gigobyte

Description

The handling of borderWidth for RNGH Pressable seems to be different than Pressable from 'react-native'. The clipping on the screenshot below is observable both with horizontal and vertical FlatLists. It also doesn't matter if FlatList from RNGH or RN is used, both produce the same results.

This issue only happens on Android and can be observed on debug/release build, both emulator and real devices consistently.

Image

The fix seems to be to move the styles from the Pressable to a nested View.

Steps to reproduce

  1. Example code is provided in the gist

A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.

https://gist.github.com/gigobyte/56574a3b2f95223f5bf40fb5b2d43efd

Gesture Handler version

2.27.2

React Native version

0.79.0

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

New Architecture (Fabric)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

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