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

fix: textinput sizing for [email protected] #4084

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

tjaniczek
Copy link
Collaborator

@tjaniczek tjaniczek commented Sep 18, 2023

Summary

Looks like in react-native-web from v0.19.0 texts must have specified lineHeight property, otherwise there are problems with sizing for absolutely positioned elements Checked other components and it looks like it only affects TextInput in our case.

Fixed by adding default lineHeight of fontSize * 1.2, this should work with our default font and most custom fonts as well. If user decides to use some esoteric font - there may be a need to specify custom lineHeight .

Fixes: #4041 #3825

Test plan

Tested for [email protected] (currently used in examples) and v0.19.8 (latest). Seems to fix the issue, also does not affect iOs nor Android

@github-actions
Copy link

The mobile version of example app from this branch is ready! You can see it here.

@lukewalczak lukewalczak added this to the 5.10.5 milestone Sep 18, 2023
@lukewalczak lukewalczak merged commit 2fa36a4 into main Sep 18, 2023
3 checks passed
@lukewalczak lukewalczak deleted the fix/textinput-sizing-web branch September 18, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Label background is slightly mispositioned on web
2 participants