Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 当我在TextInput中处于焦点时,单击其他元素_React Native_Mobile_Touch_Textinput - Fatal编程技术网

React native 当我在TextInput中处于焦点时,单击其他元素

React native 当我在TextInput中处于焦点时,单击其他元素,react-native,mobile,touch,textinput,React Native,Mobile,Touch,Textinput,当我在打开键盘的情况下输入文本时。如果单击其他组件,则无响应,键盘关闭 如果键盘打开,如何使其他元素对我的触摸作出反应 守则: <View style={{flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }} > <TouchableOpacity onPress={ () => console.log('aaaa')}>

当我在打开键盘的情况下输入文本时。如果单击其他组件,则无响应,键盘关闭

如果键盘打开,如何使其他元素对我的触摸作出反应

守则:

<View style={{flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }} >
        <TouchableOpacity onPress={ () => console.log('aaaa')}>    
          <Image source={require('Assets/images/icons/back.png')} />
        </TouchableOpacity>

        <TextInput
          style={[{height: 35, textAlignVertical: 'center', paddingTop: 0, paddingBottom: 0, color: 'white'}]}
          placeholder="Music expert, company or music style..."
          onChangeText={this.changeText}
          autoFocus={true}
        />

        <TouchableOpacity onPress={ () => console.log('aaaa')}>    
          <Image source={require('Assets/images/icons/close.png')} />
        </TouchableOpacity>
      </View>
</View>

console.log('aaaa')}>
console.log('aaaa')}>

如果我是TexInput的焦点,并单击任意按钮,则只需关闭键盘,但不显示console.log

请显示您的代码,在正常情况下,它可以响应click@Lenoarod我用代码编辑了这篇文章嗨,我用你的代码来尝试,其他组件响应点击,你在链接上看到代码()F***k!我已经遇到了这个问题。我将该组件封装在一个scrollview中,但它没有放入
键盘shouldPersistTaps='handled'
。非常感谢您的帮助@lenoarod请显示您的代码,在正常情况下,它可以响应click@Lenoarod我用代码编辑了这篇文章嗨,我用你的代码来尝试,其他组件响应点击,你在链接上看到代码()F***k!我已经遇到了这个问题。我将该组件封装在一个scrollview中,但它没有放入
键盘shouldPersistTaps='handled'
。非常感谢您的帮助@Lenoarod