-
-
Notifications
You must be signed in to change notification settings - Fork 136
fix: manual did events #1161
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
Draft
kirillzyusko
wants to merge
9
commits into
main
Choose a base branch
from
feat/manual-did-events
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
fix: manual did events #1161
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
📊 Package size report
|
e0e43f5 to
21b0ebd
Compare
21b0ebd to
cfe6ffc
Compare
cfe6ffc to
f6d8877
Compare
…we may dispatch `end` event after animation finish + 1 frame. If cross-fade transitions enabled on iOS 18.5, the `opacity` animation will gone, and we'll read keyboard frame and it'll produce a jump when keyboard hides. Tracking if animation has been finished allows us to skip those undesired frames and in future they may help to improve performance if we start to use Newton Rhapson method
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To Do
0inisFinished?)📜 Description
Manually dispatch
endevents on iOS.💡 Motivation and Context
With iOS 26 introduction Apple changed many internals. One critical change for
keyboard-controlleris timing of events. The timing was really stable across iOS 12-16. But starting from 17 we get issues like #327 which we fixed in a different ways, but the last and the most stable fix was made in #557However with new changes relying on
didevents on iOS is not reliable anymore 😔 I've been analyzing many options, but the most reliable in my understanding is dispatching those events myself. Since we have an access to the animation and the beginning of the event, we can easily dispatch our own event when animation finishes.So in this PR I'm doing exactly that - we don't rely on OS events anymore and dispatch our own events. It looks ridiculous, because we are literally fixing OS bugs, but it is as it is.
At the moment iOS 26 dispatches
keyboardDidShowafter ~40ms if cross-fade + reduced motion enabled. In first OS versions they always dispatchedkeyboardDidShowstraight afterkeyboardWillShow(which produced missing animation, but they fixed it before a global launch, I think).Closes #1242 #1141
📢 Changelog
JS
react-native-worklet;iOS
🤔 How Has This Been Tested?
Tested locally on:
📸 Screenshots (if appropriate):
Issue 1141
Issues 1242
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-01-14.at.12.58.13.mov
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-14.at.12.45.20.mov
Issue 327 (works as before)
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-14.at.10.04.31.mov
📝 Checklist