Skip to content

TextInput does not scroll on Android with multiline on and editable off #23117

Closed
@ishigamii

Description

@ishigamii

Environment

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
      Memory: 328.79 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.2 - ~/.nvm/versions/node/v8.11.2/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.2/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: 17, 21, 23, 25, 26, 27
        Build Tools: 23.0.1, 23.0.3, 24.0.1, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.1, 27.0.3, 28.0.2, 28.0.3
        System Images: android-25 | Google APIs Intel x86 Atom_64
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3
      react-native: 0.57.8 => 0.57.8

in #18601 issue is happened on version 0.54.3, but that issue is closed.

in #14856 issue is happened on version 0.46, but that issue is closed.

Steps to Reproduce

Set a part Props of "TextInput" as follows.

multiline={true}
editable={false}

Set more lines text contents in this "TextInput" while
For example, if this "TextInput" can display up to max 5 lines in one times, Set 6 or more lines text in it.

Expected Behavior

I think that contents of contents should be able to be displayed by scrolling,
regardless of whether it can be input to "TextInput" or not.

Actual Behavior

At present, the current code is working perfectly on iOS.
In Android, the text is shown but if the text is too large it is impossible to scroll inside the textInput.

I tried adding some others props to the textInput in order to make sure the scroll was activated but nothing did the trick :

          autogrow
          multiline
          scrollEnabled
          editable={false}

As soon as I remove the editable the scroll works normally.

Thanks 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugComponent: TextInputRelated to the TextInput component.Platform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions