question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[0.46.1] TextInput wrapt in touchable, will led touchable stop working

See original GitHub issue

Is this a bug report?

Yes

Have you read the Bugs section of the Contributing to React Native Guide?

Yes

Environment

  1. react-native -v: react-native: 0.46.1
  2. node -v: v8.1.1
  3. npm -v: 5.1.0

Then, specify:

  1. Target Platform (e.g. iOS, Android): iOS
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Xcode

Expected Behavior

          <TouchableWithoutFeedback onPress={()=>{ //function was working here in 0.45 }>
              <View style={styles.inputContainer}>
                <TextInput
                  editable={false}
                  ref={component => this._input = component}
                  placeholder='Text Input'/>
                <TouchableOpacity
                  onPress={() => {
                    //function only working here now in 0.46
                }}>
                  <View>
                    <Text>Button</Text>
                  </View>
                </TouchableOpacity>
              </View>
          </TouchableWithoutFeedback>

Actual Behavior

The source code above was working perfectly in 0.45, but after I upgrade to 0.46 is not working. However wrapt Image or Text is working fine.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:25 (2 by maintainers)

github_iconTop GitHub Comments

118reactions
mrtomhowardcommented, Aug 23, 2017

A temporary fix that works for me is to wrap the TextInput in a View with pointerEvents set to none.

That is:

<TouchableOpacity onPress={()=>{console.log('press')}}>
   <View pointerEvents='none'>
      <TextInput editable={false} />
   </View>
</TouchableOpacity>

This is working for me right now on RN 0.47.1.

13reactions
ofilipowiczcommented, Nov 19, 2017

@bermann @ilonashub setting pointerEvents to box-only makes it work with TouchableWithoutFeedback

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Elements - Wrapping a touchable opacity around ...
I am having a very peculiar issue with React Native Elements Text Input along with using touchable opacity. import ...
Read more >
types/react-native/index.d.ts - UNPKG
1190, * If `true`, allows TextInput to pass touch events to the parent component. 1191, * This allows components to be swipeable from...
Read more >
Dependencies | @boardroom/aave | npm | Open Source Insights
arrow_right @boardroom/base. 7.1.0‑alpha.0 Notes Relation Licenses Dependenc... Version 7.1.0‑alpha.0 Published arrow_right @graphql‑tools/merge. 6.2.17 Notes Relation Licenses Dependenc... Version 6.2.17 Published Description
Read more >
https://packages.debian.org/de/stretch/allpackages...
It can be used to monitor and control circuslinux (1.0.3-33+b1) Clowns are ... not unlike GNU libiconv cl-base64 (3.3.4-1) Common Lisp package to...
Read more >
Aquatic Effects Monitoring Program
The scope of work for the 2021 AEMP included the following: •. Collect surface water samples at AEMP locations for laboratory analysis of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found