kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.54k stars 61 forks source link

feat: change keyboard toolbar offset instantly when keyboard is open #375

Closed IvanIhnatsiuk closed 5 months ago

IvanIhnatsiuk commented 5 months ago

📜 Description

I've added logic to handle the case where the keyboard is open and the user focuses on another text input with a different input type.

The toolbar used to change animatedly but it didn't look good, now it changes just like the native toolbar.

💡 Motivation and Context

Closes #374

📢 Changelog

Changed logic in KeyboardStickyView component to handle case when keyboard is opened and keyboard size changed.

🤔 How Has This Been Tested?

iPhone 15 pro

Pixel 3a emulator

Android 9 emulator

📸 Screenshots (if appropriate):

Pixel 3a emulator

https://github.com/kirillzyusko/react-native-keyboard-controller/assets/86000012/6f6fb831-9a60-4f94-82d1-3f4ceef6de9e

Android 9

https://github.com/kirillzyusko/react-native-keyboard-controller/assets/86000012/8120240d-d5bd-4d4c-af90-d4440cadd000

iPhone 15 pro

https://github.com/kirillzyusko/react-native-keyboard-controller/assets/86000012/ac19d34b-6305-45a6-831b-2d93c2fc91f6

📝 Checklist

kirillzyusko commented 5 months ago

@IvanIhnatsiuk do you think it would be better to merge this PR instead? https://github.com/kirillzyusko/react-native-keyboard-controller/pull/376

kirillzyusko commented 5 months ago

Closed in favor of https://github.com/kirillzyusko/react-native-keyboard-controller/pull/376