nextFocus API on tvOS using UIFocusGuide not constantly working
See original GitHub issueDescription
First of all, I want to thank you with the new implementation of nextFocus on tvOS with UIFocusGuide. It is really great and makes it usable in nearly every cases compared to previous implem.
However there is some cases where it is not working as expected:
-
When the Touchable (TouchableOpacity in my case) is moving because it is a child of an animated view that is translating. I have the feeling the UIFocusGuide you put on each side of touchable is not impacted by the animations or layout changes. I don’t know how it can be resolved, but when there is some complex UI with animations of multiple stack of buttons, it would be great if animations was not impacting nextFocus.
-
In a ScrollView. It is working when you want to nextFocus on the “exterior” sides of an item like for example, when it is a vertical list, going from the item to nextFocusLeft or nextFocusRight is working, but if you want to put for example a nextFocusDown on the first item, it is not considered and just focus the next item of the list.
I hope my explanation is clear, and i thank you again for this great repo !
Version
0.68.2-3
Output of npx react-native info
System: OS: macOS 12.3 CPU: (6) x64 Intel® Core™ i5-8500B CPU @ 3.00GHz Memory: 33.38 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.3.0 - /usr/local/bin/node Yarn: Not Found npm: 8.5.1 - /usr/local/bin/npm Watchman: 2021.06.07.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/etiennelabrot/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.3/13E113 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: ^17.0.2 => 17.0.2 react-native: Not Found react-native-macos: Not Found react-native-tvos: 0.68.2-3 npmGlobalPackages: react-native: Not Found
Steps to reproduce
Specific cases were described in the description.
If need more information about how to reproduce issues, tell me.
Snack, code example, screenshot, or link to a repository
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top GitHub Comments
Thanks for this very detailed explanation. I thought that the layout constraints on the focus guides would prevent these from happening… I’ll look into this 👍
@etiennelab it would be helpful if you can provide a simple example (either the ScrollView or animated view) that shows the issue you are trying to solve.