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

Pressable background clipping with large border radius #3137

Open
mozzius opened this issue Oct 3, 2024 · 3 comments
Open

Pressable background clipping with large border radius #3137

mozzius opened this issue Oct 3, 2024 · 3 comments
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@mozzius
Copy link

mozzius commented Oct 3, 2024

Description

RNGH's Pressable component handles large border radiuses strangely. The correct behaviour is to just round as much as possible and then stop, however RNGH's Pressable seems to make the background get more and more clipped. We use a borderRadius: 999 for our round buttons, so this means the background disappears. This is best illustrated with a screenshot (each button is 32px by 32px and the number is the border radius used):

Screenshot 2024-10-03 at 16 05 02

Appears to be iOS only

Steps to reproduce

  1. Create a Pressable with a border radius of 999 and a background color
  2. Observe no background color

Snack or a link to a repository

https://github.com/mozzius/rngh-pressable-repro

Gesture Handler version

2.20.0

React Native version

0.74.5

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iPhone 16

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided labels Oct 3, 2024
@kacperzolkiewski
Copy link
Contributor

kacperzolkiewski commented Oct 3, 2024

I ran your example on an Android device (Redmi Note 7), and the border radius worked like in default Pressable. It seems the issue occurs only on iOS.
obraz

@mozzius
Copy link
Author

mozzius commented Oct 4, 2024

Thanks! I updated the issue description

@mrpmohiburrahman
Copy link

I want to work on this.
I think there are two ways,

  • one is to make changes to the React Native's side.
  • another one is to make changes on the native side.

( To the repo maintainer ), please, let me know which path should I take.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

3 participants