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] Padding in Text and TextInput renders slightly differently #1287

Closed
oblador opened this issue May 15, 2015 · 7 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@oblador
Copy link
Contributor

oblador commented May 15, 2015

I'm trying to build a autogrowing TextInput and is using a shadow Text component to measure the text (I'm sure there's a better way, maybe expose NSString.boundingRectWithSize). However I noticed that the padding is slightly differently rendered on the two, it seems TextInput has an extra 2px (or 1pt?) horizontal padding causing the text to wrap differently.

padding: 0. TextInput first, Text last.
screendump

@nicklockwood
Copy link
Contributor

You might want to take a look at #1229 as it looks like what you're trying to do has already been implemented in that PR.

@oblador
Copy link
Contributor Author

oblador commented May 15, 2015

@nicklockwood: Thanks, missed that one. This bug still stands though, although maybe not as important :-)

@brentvatne brentvatne changed the title Padding in Text and TextInput renders slightly differently [TextInput] Padding in Text and TextInput renders slightly differently May 29, 2015
@brentvatne
Copy link
Collaborator

Example here

Could you fork this and modify it to produce the same bug?

Thanks @oblador!

@oblador
Copy link
Contributor Author

oblador commented Sep 8, 2015

Made an example of this on RNPlay. Also notice how the vertical padding is different.

@mkonicek
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/textinput-padding-in-text-and-textinput-renders-slightly-differently

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix. We rely on the community to provide
bugfixes as the core team is focused on performance.

@oblador
Copy link
Contributor Author

oblador commented Mar 16, 2016

There are bigger problems to tackle :-)

@aleclarson
Copy link
Contributor

@oblador is this still an issue?

@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants