-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Deleting an entire line in a long text inside an input makes scroll to the top on iOS #512
Comments
@ticketapp do you have a big single TextInput (multiline, but with disabled scroll) on the page? Does it makes sense to use the |
@kirillzyusko yes I have a big single TextInput (multiline with disabled scoll) on this page, but I have an other page with other elements of undetermined height where I need a |
@ticketapp in your case the problem happens, because react-native-keyboard-controller/src/components/KeyboardAwareScrollView/index.tsx Line 244 in dce5a57
Since you have a big input which is simultaneously obscured by keyboard and header - whenever you modify the text it will scroll down. A straightforward approach would be to add a new property to A more sophisticated approach would be to track cursor position ( I think temporarily you can |
Thank you very much for your response |
Many thanks @kirillzyusko 🙏🏽 |
Describe the bug
When I delete an entire line of a long text it makes the scroll view scroll to the top. It happend on Android on 1.11.6 as well but has been fixed between 1.11.6 and the current version (1.12.6)
Code snippet
<KeyboardAwareScrollView> <Input.Area autoFocus scrollEnabled={false} value={editText} minHeight={55} onChangeText={setEditText} /> </KeyboardAwareScrollView>
Expected behavior
The view shouldn't scroll if the line is not hidden
Screenshots
https://github.com/user-attachments/assets/fcf71eba-a64b-46ac-bfc8-bb1db930b522
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: