react-native-keyboard-aware-scroll-view: Can't scroll when input is in focus

I have set scrollEnabled={true} so the whole form can scroll while you are filling it up. If I set focus on some TextInput scroll works, but if I type something and then I try scrolling while TextInput is in focus scroll doesn’t work. This was working in some older versions of the library.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 17

Most upvoted comments

I still have this issue. Can’t scroll on Android when the keyboard is open. Works fine on iOS tho.

@malcevicius this module doesn’t have two ScrollViews.

I will check this issue today.

Hello!

Please test the new release and let me know if it solves this issue https://github.com/APSL/react-native-keyboard-aware-scroll-view/releases/tag/v0.4.2

PS: I’ve been taking some weeks out due to GH “maintainer burnout”. Please ping me if somebody wants to be added as collaborator into this repo. Soon it will live under a new APSL project called InterfaceKit for React Native.

I will check this out today, thanks for reporting!

Here a code sample:

import React, {Component} from 'react';
import { TextInput, Text } from 'react-native';
import PropTypes from 'prop-types';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';

class LinkAccount extends Component {
    constructor(props) {
        super(props);
        this.state = { text: '' };
    }

    render() {
        return (
            <KeyboardAwareScrollView
                keyboardShouldPersistTaps="handled"
                resetScrollToCoords={{ x: 0, y: 0 }}
                keyboardOpeningTime={0}
                scrollEnabled={true}
            >
                <Text style={{ marginBottom: 400 }}>
                    Lorem ipsum dolor sit amet.
                </Text>
                <TextInput
                    style={{height: 40, borderColor: 'gray', borderWidth: 1}}
                    onChangeText={(text) => this.setState({text})}
                    value={this.state.text}
                />

            </KeyboardAwareScrollView>
        );
    }
}

LinkAccount.propTypes = {};
LinkAccount.defaultProps = {};

export default LinkAccount;

The issue I have is: Can’t scroll when there is any content in TextInput (when it’s dirty). When its empty, no problem. This was not the case in previous versions of this lib.

Here is a video of issue https://screencast.com/t/Acrsuby6ZewG

@johngoren my problem got solved when I rollback to v0.3.0, maybe it will work for you too.