Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't scroll in child ScrollView when keyboard is open on iOS #21449

Closed
ibrahimsakar opened this issue Oct 2, 2018 · 2 comments
Closed

I can't scroll in child ScrollView when keyboard is open on iOS #21449

ibrahimsakar opened this issue Oct 2, 2018 · 2 comments
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@ibrahimsakar
Copy link

ibrahimsakar commented Oct 2, 2018

Environment

React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 1.60 GB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.9.0 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
Android SDK:
Build Tools: 25.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.3
API Levels: 23, 25, 26, 27
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

Description

I have a situation like i said in title. Sample code :

import React, { Component } from 'react';
import {View, ScrollView, Text, TextInput} from 'react-native';

export default class NestedScrollView extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }

  render() {
    return (
      <ScrollView style={{height:400, backgroundColor:'blue'}}>
        <View style={{width:200,height:100}}>
        <TextInput 
                placeholderTextColor={'#fff'}
                placeholder={'openkeyboard'}
            />
            <ScrollView style={{backgroundColor:'red'}}>
                <View style={{width:100}}>
                    <Text>test1</Text>
                    <Text>test2</Text>
                    <Text>test3</Text>
                    <Text>test4</Text>
                    <Text>test5</Text>
                    <Text>test6</Text>
                    <Text>test7</Text>
                    <Text>test8</Text>
                    <Text>test9</Text>
                    <Text>test0</Text>
                    <Text>test1</Text>
                </View>
            </ScrollView>
        </View>
      </ScrollView>
    );
  }
}

Reproducible Demo

https://snack.expo.io/BJYmjFecQ

@ibrahimsakar ibrahimsakar changed the title I can't scroll in second child ScrollView when keyboard is open on iOS I can't scroll in child ScrollView when keyboard is open on iOS Oct 2, 2018
@Summys
Copy link

Summys commented Oct 2, 2018

Use keyboardShouldPersistTaps='always' on the first ScrollView

@ibrahimsakar
Copy link
Author

Thanks, it's solved the problem 👍

@facebook facebook locked as resolved and limited conversation to collaborators Oct 2, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants