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

Using translate in style doesn't transform hitbox #2147

Open
m-bert opened this issue Jul 26, 2024 · 0 comments
Open

Using translate in style doesn't transform hitbox #2147

m-bert opened this issue Jul 26, 2024 · 0 comments
Labels
bug Something isn't working Needs: Triage 🔍

Comments

@m-bert
Copy link

m-bert commented Jul 26, 2024

Environment

First setup:

react-native -v: 0.73.9
npm ls react-native-macos: 0.73.34

Second setup:

react-native -v: 0.72.4
npm ls react-native-macos: 0.72.4

node -v: 21.5.0
npm -v: 10.2.4
yarn --version: 1.22.22
xcodebuild -version: Xcode 15.4 Build version 15F31d

Steps to reproduce the bug

This issue is present on both setups mentioned in Environment section

Steps to reproduce:

  1. Add any component like Pressable, Button...
  2. Apply translate property (e.g. transform:[{translateY: 100}].
  3. Observe that component registers clicks on its original position, not on the transformed one.

Expected Behavior

Component should register interactions on the transformed position.

Actual Behavior

As shown on the video below, components register interactions on their original positions, not on the translated ones.

Nagranie.z.ekranu.2024-07-26.o.15.35.51.mov

Reproducible Demo

Link below contains 2 example codes:

  1. Complete reproduction from video above
  2. Minimal reproduction

https://gist.github.com/m-bert/dbee459661838814ad715d4f15d74fca

Additional context

Seems related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

1 participant