-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 Prevent Scroll #15962
Comments
@facebook-github-bot stack-overflow |
Hey @limeytrader007, thanks for posting this! @radko93 tells me this issue looks like a question that would be best asked on Stack Overflow. Stack Overflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. See "What to Expect from Maintainers". |
+1 how? thanks |
+1 |
1 similar comment
+1 |
Patch RCTTextView.m
to |
@gastonmorixe has some example? |
Summary: On iOS, it is not possible to select a range of text using a `Text` component (see #13938). Because of how the `Text` component is implemented on iOS, this will not work without a complete re-write. On Android however, this is not an issue. As the `TextInput` component has evolved, it can more or less be used as a drop-in replacement on iOS by setting `multiline={true}` and `editable={false}`. Except for one detail: the text input field has scrolling activated and it's not possible to turn off. (See #1391 and #15962). This pull request addresses that issue, simply by exposing the `scrollEnabled` property: ``` <TextInput multiline editable={false} scrollEnabled={false} /> ``` 1. Create a multiline `TextInput` component, with the attributes presented above. 2. Run on iOS 3. The `TextInput` field should not be able to scroll facebook/react-native-website#367 [IOS] [FEATURE] [TextInput] - Made it possible to turn off scrolling on a multiline TextInput component Pull Request resolved: #19330 Differential Revision: D9235061 Pulled By: hramos fbshipit-source-id: 99d278004fc236b47dde7e61d74c71e8a3b9d170
Summary: On iOS, it is not possible to select a range of text using a `Text` component (see #13938). Because of how the `Text` component is implemented on iOS, this will not work without a complete re-write. On Android however, this is not an issue. As the `TextInput` component has evolved, it can more or less be used as a drop-in replacement on iOS by setting `multiline={true}` and `editable={false}`. Except for one detail: the text input field has scrolling activated and it's not possible to turn off. (See #1391 and #15962). This pull request addresses that issue, simply by exposing the `scrollEnabled` property: ``` <TextInput multiline editable={false} scrollEnabled={false} /> ``` 1. Create a multiline `TextInput` component, with the attributes presented above. 2. Run on iOS 3. The `TextInput` field should not be able to scroll facebook/react-native-website#367 [IOS] [FEATURE] [TextInput] - Made it possible to turn off scrolling on a multiline TextInput component Pull Request resolved: #19330 Differential Revision: D9235061 Pulled By: hramos fbshipit-source-id: 99d278004fc236b47dde7e61d74c71e8a3b9d170
Are there any props (I don't see any in docs) to prevent a multiline TextInput from scrolling at all?
Thanks
The text was updated successfully, but these errors were encountered: