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
KeyboardAwareScrollView scrolling too much when pasting a lot of content in multiline inputibox #348
Comments
@domenicoprestia maybe double scroll happens because of "simultaneous" layout & text-change handlers? Would you mind to try to remove this code: useAnimatedReaction(
() => input.value,
(current, previous) => {
if (
current?.target === previous?.target &&
current?.layout.height !== previous?.layout.height
) {
const prevLayout = layout.value;
layout.value = input.value;
scrollPosition.value += maybeScroll(keyboardHeight.value, true);
layout.value = prevLayout;
}
},
[],
); And see whether it fixes the problem? |
yes i'll try instantly, in which file can i find it? |
i've just tried and without that chunk of code it does not scroll when pasting |
@domenicoprestia doesn't scroll at all or doesn't scroll too much (i. e. expected/desired behavior)? 😅 |
when i remove it it does not scroll at all, sorry for not being too specific 😅 |
I've tried to reproduce the problem in example app, but no luck - maybe you can provide a code snippet with minimal reproduction example?
|
Sorry, just saw this comment, i'll try to reproduce it again and to give you more background informations on this |
Describe the bug
It happens that when i try to paste a big chunk of text in a multiline TextInput that requires the KeyboardAwareScrollView to scroll, the scroll happens, but it's not as precise as in other times, it looks like it scrolls to much.
Code snippet
Cant share code since is a private repo, but its a TextInput inside a KeyboardAwareScrollView
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Having the right scroll space without scrolling too much
Screenshots
Screen.Recording.2024-01-30.at.09.36.17.mov
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: