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 scrollEnabled prop existing crashes on iOS when multiline is false #22949

Closed
3 tasks done
th317erd opened this issue Jan 10, 2019 · 3 comments
Closed
3 tasks done
Labels
Bug Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.

Comments

@th317erd
Copy link

Environment

React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: (6) x64 AMD FX(tm)-6300 Six-Core Processor
Memory: 4.52 GB / 31.32 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 11.6.0 - ~/.nvm/versions/node/v11.6.0/bin/node
npm: 5.7.1 - ~/.nvm/versions/node/v11.6.0/bin/npm
SDKs:
Android SDK:
API Levels: 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
Build Tools: 19.1.0, 20.0.0, 21.1.2, 22.0.1, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 27.0.3
System Images: android-19 | Google APIs Intel x86 Atom, android-21 | Google APIs Intel x86 Atom_64, android-25 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom
npmPackages:
react: 16.6.3 => 16.6.3
react-native: ^0.57.8 => 0.57.8
npmGlobalPackages:
react-native-cli: 2.0.1

Description

On iOS, the application will crash if a scrollEnabled={false || anyValue} if the multiline prop is anything but true. I am attempting to do a <TextInput multiline={multilineEnabled} scrollEnabled={multilineEnabled}/> but this crashes the app when multiline isn't enabled, forcing me to do a workaround using property spreading. This is a bug and should be fixed. The presence of a prop, no matter what the value, should not crash the app.

This was previously reported here, and marked as stale (like MANY of the other ignored / unresolved issues in this community): #21339

Reproducible Demo

On iOS, all you need to do is run a simple vanilla app with the following JSX and the app will crash:
<TextInput multiline={false} scrollEnabled={false}/>

@th317erd th317erd changed the title TextInput scrollEnabled existing crashes on iOS when multiline is false TextInput scrollEnabled prop existing crashes on iOS when multiline is false Jan 10, 2019
@react-native-bot react-native-bot added 🔶Components Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. Platform: Linux Building on Linux. labels Jan 10, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@th317erd
Copy link
Author

Why was this closed? It is still very much an issue. Using the latest react-native version.

@zhongwuzw
Copy link
Contributor

@th317erd Hi, this issue fixed in 9ff43ab. It may works in next release.

@th317erd
Copy link
Author

Ah, awesome. Thank you!

@facebook facebook locked as resolved and limited conversation to collaborators Feb 11, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 11, 2020
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: iOS iOS applications. Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants