Closed
Description
Is this a bug report?
Yes.
Have you read the Contributing Guidelines?
Yes.
Environment
react-native -v
: 0.45.1node -v
: v6.10.3npm -v
: 3.10.10yarn --version
: 1.0.1
Then, specify:
- Target Platform: Android & iOS
- Development Operating System: macOS 10.12.5
- Build tools:
react-native run-ios
&react-native run-android
Steps to Reproduce
- Add a Text component anywhere in project (add another component underneath it or use a border - needed to see the issue)
- Add some text to get it to reach the exact width of the Text component - this may take a few attempts as not all characters have the same width and may require using some punctuation as well
- The text will introduce an unwanted linebreak without any characters moving with it, creating a new blank line with no text
Expected Behavior
Some text should either wrap to the new line or a new line should not be created.
Actual Behavior
On both iOS & Android, when the length of the text string is the width of the Text component, it adds a linebreak.
Reproducible Demo
I have managed to reproduce the issue on both Android & iOS:
https://snack.expo.io/S1EhNIVqb
Since the sizes of the screens on the two devices is different, I had to make slightly different examples for both, but the problem is the same.