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