【问题标题】:React Native text field inside webview got overlap at last textfieldwebview中的React Native文本字段在最后一个文本字段重叠
【发布时间】:2020-07-22 06:43:33
【问题描述】:

在我的 react native 应用程序中,我有一个 webview,在里面我有 4 个文本字段,所以当我关注最后一个文本输入时,键盘与最后一个文本字段重叠,不会自动滚动下面是 m 代码

render() {
return (
    <View style={styles.mainView} >
    <WebView 
     ref={r => this.webview = r}
     style={{width:globals.screenWidth, height:globals.screenHeight}}
     bounces={false}
     style={{ flex: 1 }}
     startInLoadingState
     scalesPageToFit
     javaScriptEnabledAndroid={true}
     javaScriptEnabled={true}
     domStorageEnabled = {true}
     onNavigationStateChange={this.handleNavigationStateChange}
     onLoadStart={() => {
     }}
     onLoadEnd={() => {
     }}
    source={{uri: this.state.url}}
     onError={(error) => this.onError()}
    />
    </View>
);
}

所以任何想法我该如何解决这个问题你的所有建议都是可观的

【问题讨论】:

  • 你能分享完整的代码吗?

标签: android react-native webview


【解决方案1】:

【讨论】:

    猜你喜欢
    • 2014-09-15
    • 1970-01-01
    • 2018-07-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-09
    • 1970-01-01
    • 2017-05-17
    相关资源
    最近更新 更多