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

[Android] TextInput inside a scrollView does not scroll to when focused #22951

Closed
asaravi opened this issue Jan 10, 2019 · 1 comment
Closed
Labels
Bug Component: ScrollView Component: TextInput Related to the TextInput component. Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@asaravi
Copy link

asaravi commented Jan 10, 2019

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (8) x64 Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
      Memory: 30.73 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.9.4 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 5.6.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 25, 26, 27
        Build Tools: 23.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.3
        System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.1 => 16.6.1
      react-native: 0.57.5 => 0.57.5
    npmGlobalPackages:
      react-native-cli: 2.0.1

Description

Hey Guys,

I've been trying to narrow this down but it doesn't look like I'm getting anywhere. I was hoping that you may have more insight into the situation, or if its simply an android bug waiting to be fixed.

I've noticed that with the below xml, when a TextInput field is focused, the ScrollView container is not focused into. The keyboard does pop up however, and the field is focused, it just doesn't scroll so that the input field is visible.

The basic structure is as below:

<KeyboardAvoidingView>
  <SafeAreaView>
    <ScrollView>
      ...
      <TextInput />
      ...
    <ScrollView>
  </SafeAreaView>
</KeyboardAvoidingView>

The snack below illustrates this as well, where the button up top focuses in to the InputText, but it doesn't scroll.

Please let me know if any more information is required

Reproducible Demo

https://snack.expo.io/HkZimXHfN

@cpojer
Copy link
Contributor

cpojer commented Apr 2, 2019

This seems more like a question than a bug report. Please ask on StackOverflow instead :)

@cpojer cpojer closed this as completed Apr 2, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Apr 2, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: ScrollView Component: TextInput Related to the TextInput component. Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants