Description
Description
When a touchable is rendered offscreen (or possibly just outside the bounds of its parent) but moved into view using translateX
/translateY
, it cannot be pressed. This bug is only present on Android, and works fine on iOS.
There's been a few issues related to this that have been closed due to inactivity, so I'm opening a new one. They are:
- Android: Press events not firing on component if rendered outside window by transform #27647 by @AdamGerthel
- Components translated into view are not tappable on Android #26219 by @lehresman (whose repro snack I copy+pasted for this issue)
- View bounds and touchable area incorrect after a rotate or a scale transform #19637 by @floriancargoet which seems very closely related, but that particular issue was fixed by Fixed android bounding box #25836
(@AdamGerthel and @lehresman I'd be interested to know if you got any further debugging these issues?)
React Native version:
0.61.2
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Open the snack https://snack.expo.io/@bdrobinson/android-offscreen-touchable-bug on an android device
Expected Results
When you press the left/right buttons, both should be expected to respond to your touches (you can run on iOS to verify this). However, on Android only the left one responds to touches, whereas the right doesn't.
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/@bdrobinson/android-offscreen-touchable-bug (copy+pasted from #26219)