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: input label not visible on ios if multiline, fixes #4482 #4497

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

damianfilipek81
Copy link

Motivation

This PR solves this issue. "When focusing into a TextInput (when mode='flat'), the label disappears. It shows up normally when multiline=false, and this is only a problem on iOS."

Related issue

issue

Test plan

I've checked it on ios simulator and android emulator, since example project is on expo 48 i cannot install it on my phone.
I've also updated TextInput.test.tsx.snap snapshot since tests were failing.

@callstack-bot
Copy link

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

@iM-GeeKy
Copy link

iM-GeeKy commented Oct 7, 2024

@gedu Is this planned to be merged? Still an issue in 5.12.5.

@ericpoulinnz
Copy link

@gedu @BogiKay any plans on merging this in now that new arch is supported?

Copy link
Contributor

@BogiKay BogiKay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the fix and works good, the issue is gone. I just found one little improvement that can be done. Beside that all good 👍

@@ -138,7 +138,7 @@ const InputLabel = (props: InputLabelProps) => {
// This gives the effect of animating the color, but allows us to use native driver
<View
pointerEvents="none"
style={[StyleSheet.absoluteFill, styles.overflow]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to apply styles.labelContainer twice. Can you get rid of it from line 147?

@ericpoulinnz
Copy link

Worth checking that this PR fixes the issue on web as well. Since I posted the issue (#4482) I found this also is a problem on web.

@BogiKay
Copy link
Contributor

BogiKay commented Jan 27, 2025

@ericpoulinnz I tested it and the issue is gone on web as well

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.

5 participants