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 long text causes wrapping (ios) #4261

Merged
merged 8 commits into from
Jan 10, 2024
Merged

fix: textinput long text causes wrapping (ios) #4261

merged 8 commits into from
Jan 10, 2024

Conversation

john-trieu-nguyen
Copy link
Contributor

@john-trieu-nguyen john-trieu-nguyen commented Jan 8, 2024

Motivation

Release 5.10.5 introduced #4084 which created a bug in TextInput (iOS) when there is a long text value.

iOS has a specific style requirement (possibly related) for TextInput to show the ellipsis and not wrap when there is a long text value.

RequiredStyle: {
    textAlign: 'auto',
    lineHeight: undefined,
}

#4084 prevents lineHeight having "undefined" as a possible value. Given that #4084 was specifically only addressing web requirements, this pull request introduces a web platform check.

Related issue

Fixes: #2581

Test plan

Have written an example TextInput component to test for expected iOS behaviour.

Requesting some assistance in writing the Jest test.

@callstack-bot
Copy link

callstack-bot commented Jan 8, 2024

Hey @john-trieu-nguyen, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@john-trieu-nguyen
Copy link
Contributor Author

Not sure how to write test to expect different behaviours between web and native.

@lukewalczak lukewalczak merged commit f5c8485 into callstack:main Jan 10, 2024
3 checks passed
@lukewalczak lukewalczak added this to the 5.12.0 milestone Jan 10, 2024
@john-trieu-nguyen john-trieu-nguyen deleted the fix-textinput-regression branch January 17, 2024 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextInput: long text results in linebreak
4 participants