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

Ios TextInput multiline Issue #68

Open
ferminmoli opened this issue Dec 6, 2017 · 7 comments
Open

Ios TextInput multiline Issue #68

ferminmoli opened this issue Dec 6, 2017 · 7 comments

Comments

@ferminmoli
Copy link

Keyboard overlaps Text Input multine once you start typing.

@hungdev
Copy link

hungdev commented Apr 17, 2021

i get same issue

@lkoehl
Copy link

lkoehl commented Aug 2, 2021

Dealing with the same problem. Are there any solutions yet?

@hungdev
Copy link

hungdev commented Aug 2, 2021

@lkoehl i still don't have solution for it, if you find out, please write it down here <3

@lkoehl
Copy link

lkoehl commented Aug 2, 2021

This problem really gives me headaches, I have no solution yet but it might be a good idea to present my findings.

As we all know this problem appears when you use a TextInput component with multiline enabled and no fixed height. The keyboard spacer does create a view in the needed height, but somehow the TextInput completely ignores it and will continue growing even out of view. I also created my own quick and dirty keyboard-spacer to test it. From this test I am going to say that this problem isn't part of the the keyboard spacer instead it is a problem with TextInput.

My first idea was to restrain the height of the parent view, but that doesn't work. The TextInput grows in size until it is the size of the parent. It complete ignores all other sibling components and even pushes them out of frame. Awesome. Maybe it's a know bug?

So far the only solution insight is to restrain the size of the TextInput itself and animate its height. I don't really have a solution for it so far.

@hungdev
Copy link

hungdev commented Aug 2, 2021

@lkoehl I have an idea, to calculate the height of input you can use onLayout to get the height. We need to pass the height of input to keyboard spacer component.
Sorry i can't fix it, because I don't have knowledge about animation :/

@lkoehl
Copy link

lkoehl commented Aug 3, 2021

@hungdev Check out this component I created. It is very hacky and not very beautiful good. Give it a shot, so far it works for me. Will be adding a Demo and a README soon.

@hungdev
Copy link

hungdev commented Aug 14, 2021

@lkoehl nice!

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

No branches or pull requests

3 participants