fix: keep shadow nodes in sync#950
Merged
kirillzyusko merged 2 commits intomainfrom May 22, 2025
Merged
Conversation
Contributor
📊 Package size report
|
This was referenced May 21, 2025
High5Apps
added a commit
to High5Apps/organize-rn
that referenced
this pull request
May 21, 2025
- Remove the patch that reverts kirillzyusko/react-native-keyboard-controller#898 - Add a patch that includes kirillzyusko/react-native-keyboard-controller#950 - Original patch added in 7a599df
High5Apps
added a commit
to High5Apps/organize-rn
that referenced
this pull request
May 21, 2025
- Remove the patch that reverts kirillzyusko/react-native-keyboard-controller#898 - Add a patch that includes kirillzyusko/react-native-keyboard-controller#950 - Original patch added in 7a599df - Upstream issue: kirillzyusko/react-native-keyboard-controller#947
This was
linked to
issues
May 22, 2025
3 tasks
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
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.
📜 Description
Fixed a problem when
Pressabledoesn't triggeronPresscallback if it's located inKeyboardStickyView(KeyboardToolbar).💡 Motivation and Context
The problem stems from the fact that C++ shadow nodes do not know about changes caused by
useKeyboardAnimationhook (we drive animation by native driver, so C++ thinks that view hasn't changed its position).I found out that
ScrollViewhad the same problem: facebook/react-native#36504 (comment)Basically the fix is next:
onUserDrivenAnimationEnded;useAnimatedProps:Where:
Which in turns calls:
And it triggers re-render and synchronizes C++ state with latest react state.
Probably not the best solution, but it fixes the problem. Also we have to gather all connected nodes that depends on animated value, but at the moment this data is unused:
So for now it's safe to skip connected nodes 🙃 (maybe later I'll revisit this)
Closes #947 #916 #588
📢 Changelog
Android
keepShadowNodesInSyncfunction extension forThemedReactContext;keepShadowNodesInSyncin the end of keyboard animation.🤔 How Has This Been Tested?
Tested manually in FabricExample.
📸 Screenshots (if appropriate):
telegram-cloud-document-2-5294411674747433771.mp4
telegram-cloud-document-2-5294411674747433770.mp4
📝 Checklist