-
-
Notifications
You must be signed in to change notification settings - Fork 102
KeyboardAwareScrollView with multiline scrolls to bottom #897
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
Comments
can't seem to upload any footage |
had to compress, ignore the watermark screen-recording-2025-04-01-at-192134_IIKXokJK.mp4 |
screen-recording-2025-04-01-at-192826_yUHFWnnr.mp4tried my own approach but had it's own issues but this is my expected behaviour at least in the video
|
Related to #512 (comment) |
Yeah, I was trying to fix it in #546 I re-wrote |
Ah I tried that PR but was still having issue but seems like you are already on it! If you are curious about the other issue (scroll to bottom on new line) I was facing with that PR, I got the logs in a video for you: I hope that is helpful :) |
Issues:
Expected:
I see the pain here as this is an edge case. |
One of the issues with the new line at the beginning of the textinput is fixed by facebook/react-native@f6badca in https://github.com/facebook/react-native/releases/tag/v0.76.2 and was due to my react native version |
@Bowlerr I've seen you forked the package. Just wanted to say that if you are going to fix this problem, then there is e2e tests that starts automatically if you open PR to main, so you can use them to verify implementation. However, since you change the logic (depending on the cursor position instead of layout) most likely you will have to take new screenshots (I can help here if needed)). Last time when I tried to reproduce the problem in my PR I realized, that we shouldn't rely on height changes at all (we can remove useAnimatedReaction) and we should rely only on onSelectionChange event. However there were some desynchronization issues (like onLayout event got triggered later and I had invalid coordinates to scroll into), so I postponed work here... Just wanted to share that info because I think it can be helpful 👀 |
@kirillzyusko thanks, I thought I would play around with the example page and see if I can find a solution |
@kirillzyusko I think I've got a working solution but two issues on android. One is that the multiple line inputs always start the text cursor from the bottom The other is the keyboard opening on android causes a jump I'll open a PR so you can check it out |
Describe the bug
When using KeyboardAwareScrollView with a multiline text input that has no max height, when trying to make changes, it will scroll / jump to the bottom of the screen.
Repo for reproducing
https://github.com/Bowlerr/ExampleKeyboard
To Reproduce
Expected behaviour
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: