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

Text component adds a linebreak when string content is equal to width of component #24977

Closed
jenskuhrjorgensen opened this issue May 21, 2019 · 1 comment
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@jenskuhrjorgensen
Copy link

🐛 Bug Report

On iOS (and possibly Android), when the length of the text string is the width of the Text component, it adds a linebreak. This is a duplicate of #24674 which was closed due to missing env info.

This is a copy of this closed issue.

To Reproduce

  1. Add a Text component anywhere in project (add another component underneath it or use a border - needed to see the issue)
  2. 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
  3. The text will introduce an unwanted linebreak without any characters moving with it, creating a new blank line with no text

Expected Behavior

Don't create an empty new line.

Code Example

https://snack.expo.io/@jenskuhr/text-early-line-wrap

Environment

Expo v. 32.0.0

[skip envinfo]
Newest version of Expo is used. I don't know how a smart way to get the react-native version of Expo, but sniffing around their repo lead to the following:
react-native: 0.59.5
react: 16.8.3

@react-native-bot
Copy link
Collaborator

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

👉 Click here if you want to report a reproducible bug or regression in React Native.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: No Template labels May 21, 2019
@facebook facebook locked as resolved and limited conversation to collaborators May 21, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 21, 2020
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: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants