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.78k stars 81 forks source link

fix: incorrect `KeyboardStickyView` state when keyboard animation interrupted #704

Closed kirillzyusko closed 3 days ago

kirillzyusko commented 4 days ago

šŸ“œ Description

Fixed broken KeyboardStickyView position if keyboard dismissing has been interrupted (by showing a native sheet, for example).

šŸ’” Motivation and Context

This problem was discovered in https://github.com/bluesky-social/social-app/pull/6739

However I discovered such issue even earlier in https://github.com/kirillzyusko/react-native-keyboard-controller/pull/667 - there I found out that progress can be interrupted (keyboard can start its movement, but then will be interrupted and will be instantly hidden) and onEnd event will be triggered.

Back to the times I fixed a problem by calling maybeScroll in onEnd handler. in this PR I want to do a similar thing - the only difference is that I want to add onEnd event to mapping for Animated/Reanimated values (useKeyboardAnimation/useReanimatedKeyboardAnimation hooks).

A proper fix for https://github.com/bluesky-social/social-app/pull/6739

šŸ“¢ Changelog

Android

šŸ¤” How Has This Been Tested?

Tested on CI.

šŸ“ Checklist

github-actions[bot] commented 4 days ago

šŸ“Š Package size report

Current size Target Size Difference
161743 bytes 161655 bytes 88 bytes šŸ“ˆ