Skip to content
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: dynamic parent distance #777

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Conversation

kirillzyusko
Copy link
Owner

@kirillzyusko kirillzyusko commented Jan 24, 2025

📜 Description

Added traversal to closest RN view instead of relying on superview.

💡 Motivation and Context

The original problem comes from the fact, that theoretically first responder can be not directly nested in RN view, for example:

Image

In this case UIView is a first responder, but RN view with a tag is CardFieldView. If we always rely on .superview then our reactViewTag will be nil and we will send -1 to RN. As a result useReanimatedFocusedInput will always send null as layout and we will not be able to measure the content of the input view and components, such as KeyboardAwareScrollView will not work.

Closes #775

📢 Changelog

iOS

🤔 How Has This Been Tested?

Tested manually on iPhone 15 Pro (iOS 17.5).

📸 Screenshots (if appropriate):

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🍎 iOS iOS specific focused input 📝 Anything about focused input functionality labels Jan 24, 2025
@kirillzyusko kirillzyusko self-assigned this Jan 24, 2025
Copy link
Contributor

github-actions bot commented Jan 24, 2025

📊 Package size report

Current size Target Size Difference
168663 bytes 168887 bytes -224 bytes 📉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working focused input 📝 Anything about focused input functionality 🍎 iOS iOS specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with Stripe card component on RN v0.74
1 participant