-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Android: Text ellipsizeMode="clip" crashes on Android #18474
Comments
We should make this clearer in the docs. Can you open an issue at https://github.com/facebook/react-native-website instead? Closing as clip is a iOS-only prop. |
I strongly disagree. This is not a documentation issue. |
Let us know if you have a PR that changes this behavior. |
Fixes facebook#18474 Applies the default behavior if the ellipsize mode is set to "clip", since it's only supported by IOS
Hi there! I just sent a PR with the fix for this issue, hope it helps! |
@t4deu maybe just ignoring the property is the more 'expected' behavior. |
Hi @borisyankov, the default |
Fixes facebook#18474 Summary: This allows use clip as ellipsize mode for truncated text on android
Summary: Fixes facebook#18474 This allows use clip as ellipsize mode for truncated text on android Added a test to RNTester, so it can be tested from there: 1. Run RNTester project 2. Navigate to `<Text>` tests 3. Scroll down to "Ellipsize mode" examples 4. Check the default behavior being applied when the value is set to "clip" <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [ANDROID] [BUGFIX] [Text] - Prevents android crash due to unsupported "clip" ellipsize mode <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes facebook#18540 Differential Revision: D7396379 Pulled By: mdvacca fbshipit-source-id: 6c4b223731143c5081b3d12a3c740d1e375bd586
Summary: Fixes facebook#18474 This allows use clip as ellipsize mode for truncated text on android Added a test to RNTester, so it can be tested from there: 1. Run RNTester project 2. Navigate to `<Text>` tests 3. Scroll down to "Ellipsize mode" examples 4. Check the default behavior being applied when the value is set to "clip" <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [ANDROID] [BUGFIX] [Text] - Prevents android crash due to unsupported "clip" ellipsize mode <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes facebook#18540 Differential Revision: D7396379 Pulled By: mdvacca fbshipit-source-id: 6c4b223731143c5081b3d12a3c740d1e375bd586
Summary: Fixes facebook#18474 This allows use clip as ellipsize mode for truncated text on android Added a test to RNTester, so it can be tested from there: 1. Run RNTester project 2. Navigate to `<Text>` tests 3. Scroll down to "Ellipsize mode" examples 4. Check the default behavior being applied when the value is set to "clip" <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [ANDROID] [BUGFIX] [Text] - Prevents android crash due to unsupported "clip" ellipsize mode <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes facebook#18540 Differential Revision: D7396379 Pulled By: mdvacca fbshipit-source-id: 6c4b223731143c5081b3d12a3c740d1e375bd586
Summary: Fixes facebook#18474 This allows use clip as ellipsize mode for truncated text on android Added a test to RNTester, so it can be tested from there: 1. Run RNTester project 2. Navigate to `<Text>` tests 3. Scroll down to "Ellipsize mode" examples 4. Check the default behavior being applied when the value is set to "clip" <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [ANDROID] [BUGFIX] [Text] - Prevents android crash due to unsupported "clip" ellipsize mode <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes facebook#18540 Differential Revision: D7396379 Pulled By: mdvacca fbshipit-source-id: 6c4b223731143c5081b3d12a3c740d1e375bd586
Summary: Fixes facebook#18474 This allows use clip as ellipsize mode for truncated text on android Added a test to RNTester, so it can be tested from there: 1. Run RNTester project 2. Navigate to `<Text>` tests 3. Scroll down to "Ellipsize mode" examples 4. Check the default behavior being applied when the value is set to "clip" <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [ANDROID] [BUGFIX] [Text] - Prevents android crash due to unsupported "clip" ellipsize mode <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes facebook#18540 Differential Revision: D7396379 Pulled By: mdvacca fbshipit-source-id: 6c4b223731143c5081b3d12a3c740d1e375bd586
Summary: Fixes facebook#18474 This allows use clip as ellipsize mode for truncated text on android Added a test to RNTester, so it can be tested from there: 1. Run RNTester project 2. Navigate to `<Text>` tests 3. Scroll down to "Ellipsize mode" examples 4. Check the default behavior being applied when the value is set to "clip" <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [ANDROID] [BUGFIX] [Text] - Prevents android crash due to unsupported "clip" ellipsize mode <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes facebook#18540 Differential Revision: D7396379 Pulled By: mdvacca fbshipit-source-id: 6c4b223731143c5081b3d12a3c740d1e375bd586
Is this fixed? I still get error Environment: Packages: (wanted => installed) |
@codler it was fixed in master three months ago. You’re using 0.55 which does not have this fix. Try the 0.56 release. |
@hramos When is 0.56 going to be released? |
Today 👍
|
@codler 0.56 was released last month. It is scheduled to hit stable today: https://github.com/facebook/react-native/blob/master/Releases.md#release-schedule |
Environment
Environment:
OS: macOS High Sierra 10.13.3
Node: 9.0.0
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4408382
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: ^0.54.2 => 0.54.2
Steps to Reproduce
<Text />
componentExpected Behavior
While the documentation clearly states
clip is working only for iOS
I assumed this will have no effect on Android.Actual Behavior
Causes an exception manifesting as a crash inside the app:
RuntimeException com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'ellipsizeMode' of a view managed by: RCTText
The text was updated successfully, but these errors were encountered: