TextInput does not scroll on Android with multiline on and editable off
See original GitHub issueEnvironment
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 https://github.com/facebook/react-native/issues/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 👍
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top GitHub Comments
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 :
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.