-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix Android keyboard bug when opening a sheet #6739
Conversation
what’s the bug upstream? is there something we can contribute? |
@mozzius thanks! I prepared a fix in repository: kirillzyusko/react-native-keyboard-controller#704 Would you mind to try to test it? 👀 |
Confirmed that that patch fixes the issue, however actually I think we want to go with this approach - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm, let's verify it works well on device
fc26529
to
1de6a1c
Compare
…errupted (#704) ## 📜 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 bluesky-social/social-app#6739 However I discovered such issue even earlier in #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 bluesky-social/social-app#6739 ## 📢 Changelog ### Android - update `SharedValue` for `end` event on Android; - update `Animated.Value` for `end` event on iOS; ## 🤔 How Has This Been Tested? Tested on CI. ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
On Android, opening a menu in DMs would cause the keyboard input to enter a strange state. This attempts to fix it by setting the keyboard height on the
onEnd
event and reimplementing KeyboardStickyView manually (turns out it's a very simple component, and we basically are already doing same the logic anyway for the scrollview)Before
Screen.Recording.2024-11-26.at.00.17.09.mov
After
Screen.Recording.2024-11-26.at.00.18.39.mov