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

TouchableOpacity with transform and absolute position #28826

Closed
Skizu opened this issue May 4, 2020 · 3 comments
Closed

TouchableOpacity with transform and absolute position #28826

Skizu opened this issue May 4, 2020 · 3 comments
Labels
Component: TouchableOpacity Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Skizu
Copy link

Skizu commented May 4, 2020

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

When using a style such as { position: 'absolute', transform: [{ scale: -1 }] } the onPress does not always get fired, and onPressOut gets fired whilst you are still pressed down.

React Native version:

React Native Environment Info:
System:
OS: macOS 10.15.4
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 22.19 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - /var/folders/hb/7rnt8tq10n7gsrb32sqldxnw0000gn/T/yarn--1588632900439-0.14099588561658694/node
Yarn: 1.16.0 - /var/folders/hb/7rnt8tq10n7gsrb32sqldxnw0000gn/T/yarn--1588632900439-0.14099588561658694/yarn
npm: 6.9.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 26, 27, 28, 29
Build Tools: 27.0.3, 28.0.3
System Images: android-21 | Google APIs Intel x86 Atom_64, android-22 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-24 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-R | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.59.10 => 0.59.10
npmGlobalPackages:
react-native-cli: 2.0.1

Steps To Reproduce

  1. Press TouchableOpacity
  2. onPress not called.

Expected Results

Describe what you expected to happen.

Snack, code example, screenshot, or link to a repository:

https://snack.expo.io/iEjujCi!6

renderButton: function() {
  return (
    <TouchableOpacity
      onPress={this._onPressButton}
      style={{ transform: [{ scale: -1 }], position: 'absolute' }}
    >
      <Image
        style={styles.button}
        source={require('./myButton.png')}
      />
    </TouchableOpacity>
  );
},
@Skizu
Copy link
Author

Skizu commented May 4, 2020

It does not appear position: 'absolute' is needed, scale: -1 seems to be enough some of the time.

@stale
Copy link

stale bot commented Aug 3, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 3, 2020
@stale
Copy link

stale bot commented Aug 10, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 10, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: TouchableOpacity Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants