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 onPress causes an error to the whole page #1448

Closed
gie3d opened this issue Oct 2, 2019 · 1 comment
Closed

TouchableOpacity with onPress causes an error to the whole page #1448

gie3d opened this issue Oct 2, 2019 · 1 comment

Comments

@gie3d
Copy link

gie3d commented Oct 2, 2019

The problem
Use TouchableOpacity with onPress causes an error to the whole page. I added

<TouchableOpacity onPress={()=> console.log('test')}>
  <Text>Test</Text>
</TouachableOpacity>

Once I press on anywhere on the page, it shows the following errors:

Uncaught TypeError: Cannot read property 'type' of null at Object.push../node_modules/react-native-web/dist/modules/ResponderEventPlugin/index.js.ResponderEventPlugin.extractEvents 

How to reproduce
https://codesandbox.io/s/cranky-fire-r34s2?fontsize=14

Simplified test case:

Steps to reproduce:

  1. Open sandbox from this link: https://codesandbox.io/s/cranky-fire-r34s2?fontsize=14
  2. Open chrome dev tool
  3. Press on the text "Touch me!" and you will see errors on console

Expected behavior

It should alert with text "test"

Environment (include versions). Did this work in previous versions?

  • React Native for Web (version): 0.11.7
  • React (version): 16.10.1
  • React Dom (version): 16.10.1
  • Browser: Test with Chrome (77.0.3865.90 (Official Build) (64-bit) Mac

I cannot reproduce this in React & React Dom 16.8.6

@necolas
Copy link
Owner

necolas commented Oct 2, 2019

Duplicates #1443

@necolas necolas closed this as completed Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants