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 Prevent Scroll #15962

Closed
limeytrader007 opened this issue Sep 15, 2017 · 7 comments
Closed

TextInput Prevent Scroll #15962

limeytrader007 opened this issue Sep 15, 2017 · 7 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.

Comments

@limeytrader007
Copy link

Are there any props (I don't see any in docs) to prevent a multiline TextInput from scrolling at all?
Thanks

@radko93
Copy link
Contributor

radko93 commented Sep 18, 2017

@facebook-github-bot stack-overflow

@facebook-github-bot
Copy link
Contributor

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".

@facebook-github-bot facebook-github-bot added the Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. label Sep 18, 2017
@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Sep 18, 2017
@gastonmorixe
Copy link

+1 how? thanks

@markdaws
Copy link

+1

1 similar comment
@sledderGIT
Copy link

sledderGIT commented Nov 1, 2017

+1

@gastonmorixe
Copy link

Patch RCTTextView.m

    _backedTextInput.scrollEnabled = YES;

to NO

@aizigao
Copy link

aizigao commented Nov 20, 2017

@gastonmorixe has some example?

facebook-github-bot pushed a commit that referenced this issue Aug 9, 2018
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
kelset pushed a commit that referenced this issue Aug 13, 2018
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
@facebook facebook locked as resolved and limited conversation to collaborators Sep 18, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants