This repository has been archived by the owner on Feb 25, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle keyboard return for short interactions (#272)
When user has super short swiping interaction it's an issue that keyboard won't reappear on screen. That's because there is short time when system will make sure to hide keyboard no matter what. Too fast text input refocus will result only in keyboard flashing on screen and hiding right away. For such short interactions I created a delay that will ensure that the keyboard will reappear on the screen every time and make sure it's executed only when needed. It only affect super short interactions <100ms to make sure they work correctly, and doesn't affect any logic beyond that. As far as my research go it seems that the react-navigation isn't responsible for hiding the Keyboard in that specific case, so I don't think we can simply prevent this action when we don't want it. Doing the check in KeyboardMenager and delaying it is the safest way IMO - we make sure that it won't affect any other logic than concerning keyboard itself. (It would happen if we prevent the action somewhere else like in StackItem) Tested on physical iOS device, iOS simulator, and Android device with both app using the library and library's example app.
- Loading branch information