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 #35388

Closed
Yandamuri opened this issue Nov 18, 2022 · 13 comments
Closed
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Yandamuri
Copy link

Yandamuri commented Nov 18, 2022

Description

I have a form with multiline TeaxtInput field.

 <TextInput
     multiline={true}
     editable={false}
     numberOfLines={5}
 />

When the form is approved, all fields are not editable. But the problem is unable to scroll multiline TextInput field since it is not editable. User faces difficulties to read the complete text in the TextInput.

Version

"react-native": "0.70.1"

Output of npx react-native info

System:
    OS: macOS 12.5
    CPU: (8) x64 Apple M1
    Memory: 43.10 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.0.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.17 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0 
    react-native: 0.70.1 => 0.70.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

This code snippet can reproduce the issue

<TextInput
     multiline={true}
     editable={false}
     numberOfLines={5}
 />

Snack, code example, screenshot, or link to a repository

This issue had been already reported -- #23117. But there is no response form react-native team.

Can some one from react-native team confirms that, This is the default behaviour in Android?

OR

Is there any solution for this issue form react-native team?

@Yandamuri
Copy link
Author

Can some one from react-native team confirms that, This is the default behaviour in Android?

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label May 20, 2023
@Yandamuri
Copy link
Author

Any update from react-native team?

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label May 20, 2023
@aqumus
Copy link

aqumus commented May 30, 2023

I am facing similar issue where in Android input is not scrollable when editable={false}

RN: 0.70.6

Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 27, 2023
@Yandamuri
Copy link
Author

Scrolling is possible in disabled field in iOS by default, But not in Android. But I did a hack around like this,

              let openModal = () => {
			<Modal
				<TouchableOpacity activeOpacity={1}>
					<TouchableOpacity activeOpacity={1} onPress={() => null}>
						<View onStartShouldSetResponder={() => true} style={{flex: 1}}>
							<ScrollView bounces={false} style={{flex: 1}} showsVerticalScrollIndicator={false}>
								<Text>{field.input.value}</Text>
							</ScrollView>
						</View>
					</TouchableOpacity>
			        </TouchableOpacity>
			</Modal>
		}

		return (
			<TouchableOpacity activeOpacity={1} onPress={() => openModal()}>
				<TextInput
					placeholder={field.placeholder}
					value={field.input.value}
					onChange={onChangeFun}
				/>
			</TouchableOpacity>
		);

Here trick is simply wrapping the content inside ScrollView and opening it in a Modal.

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 28, 2023
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label May 26, 2024
Copy link

github-actions bot commented Jun 3, 2024

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@AyoCodess
Copy link

is an actual solution for this? the text input is not scrollable in android when editable or readonly is false.

@sanduluca
Copy link

Why is it closed ? Over 2 years without attention from team. 😢

@AyoCodess
Copy link

AyoCodess commented Oct 13, 2024

@gaearon another one for you to shout about.

@Kaddtechnologies
Copy link

Here we are in 2025 and this still doesnt work.

@AyoCodess
Copy link

Why is this closed. The problem was never addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 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

5 participants