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

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

Closed
ishigamii opened this issue Jan 23, 2019 · 5 comments
Closed
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@ishigamii
Copy link

ishigamii commented Jan 23, 2019

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 👍

@ishigamii
Copy link
Author

A solution is to change the warper style depending on what you want to do.
For me it was only to show a long text that was never gonna be editable so I changed it to :

        <ScrollView contentContainerStyle={{ flexGrow: 1, padding: 8 }}>
          <Text style={{ color: Colors.black }}>{text}</Text>
        </ScrollView>

@react-native-bot react-native-bot added 🔶Components Component: TextInput Related to the TextInput component. Platform: Android Android applications. labels Jan 23, 2019
@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.58 and verify if the issue still exists.

The "⏪Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@hramos
Copy link
Contributor

hramos commented Jan 29, 2019

Can someone who is familiar with text input on Android comment on whether this behavior comforms to platform conventions? Is this a bug, or is this working as expected?

@hramos hramos changed the title [0.57.8][Android] TextInput can not scroll with multiline on and editable off TextInput does not scroll on Android with multiline on and editable off Jan 29, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants