react-native-keyboard-aware-scroll-view icon indicating copy to clipboard operation
react-native-keyboard-aware-scroll-view copied to clipboard

Not working on first load

Open mprothero opened this issue 10 years ago • 5 comments

Firstly great job on the module, we are implementing this as our internal component as follows:

` export default class ScrollViewWrapper extends Component{

constructor(props) {
    super(props)
}

render() {
    var { children, ...otherProps } = this.props;
    return (
        <KeyboardAwareScrollView ref="scrollView" {...otherProps} showsVerticalScrollIndicator={false} keyboardShouldPersistTaps={true} keyboardDismissMode="on-drag">
            {children}
        </KeyboardAwareScrollView>
    )
}

}`

The Issue:

On first install of the app the scrolling functionality doesn't trigger. However following a force quit and restart of the app it functions as it should. Is there anything you can think of that may be causing this? We are generally rendering Forms using tcomb-react-native, wrapped in a View. Are there any caveats to rendering children?

May well be something local but just curious if you had any ideas before I lose my mind!

mprothero avatar Nov 02 '16 14:11 mprothero

Hi @Michaelprothero !

It seems that what you're doing is completely right. Have you tried to run into the device? I use this component with tcomb-form-native always and it's working fine. Which version are you running?

alvaromb avatar Nov 02 '16 14:11 alvaromb

Thanks for the quick response. Yes we are using a debug apk installed onto several QA devices, currently running into this issue in dev on Android 6.0.1. Is there any useful places you can think of for me to debug in regards to detecting keyboard events? Sorry if this is a bit vague still rooting around our code for a cause in the meanwhile.

mprothero avatar Nov 02 '16 14:11 mprothero

Mmm you can check here https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/master/lib/KeyboardAwareMixin.js#L44 when the keyboard event is triggered.

Also, try to disable the automatic scroll with enableAutoAutomaticScroll under Android. I didn't have time enough yet to bring full Android support.

alvaromb avatar Nov 02 '16 14:11 alvaromb

Thats great, will try these and have a hunt around and get back to you if we find anything, thanks for the extremely helpful responses :)

mprothero avatar Nov 02 '16 14:11 mprothero

You're welcome @Michaelprothero !

alvaromb avatar Feb 03 '17 11:02 alvaromb