Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

TextInput doesn't autoscroll down if you connect a hardware keyboard #69

Closed
dsernst opened this issue Apr 2, 2020 · 3 comments
Closed

Comments

@dsernst
Copy link

dsernst commented Apr 2, 2020

From the readme:

When the multiline TextInput create new line, the new line will automatically adjust to the top of the keyboard.

But this doesn't appear to be working if the software keyboard is hidden, because of another hardware keyboard (Cmd + K) in iOS Simulator, or after connecting a Bluetooth keyboard to your device.

Here are 2 gifs to illustrate expected vs actual:

Autoscroll works when keyboard visible:

But autoscroll stops working when the keyboard isn't visible (bc of another hardware keyboard)

I also tested this in debug mode vs release mode (as recommended here), & on a physical iPhone w/ a Bluetooth keyboard connected, and seeing it reproduce every time.

Version info:

react-native: 0.62.0
react-native-input-scroll-view: 1.9.5
iOS: 13.4
@dsernst
Copy link
Author

dsernst commented Apr 3, 2020

Looks like the relevant line is:

if (!this._keyboardShow) return;

Commenting it out fixes this issue, and allows the autoscroll to continue working w/ a hardware keyboard active.

Would this lead to unintended consequences? I don't see why that conditional was added.

@baijunjie
Copy link
Owner

Thank you for finding the problem. Since it has been a long time, I am not sure whether it will cause any side effects. I can offer an option to help you solve the problem.

@baijunjie
Copy link
Owner

@dsernst Please try v1.10.0

@dsernst dsernst closed this as completed Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants