callstack / react-native-visionos

A framework for building native visionOS applications using React
https://callstack.github.io/react-native-visionos-docs/
MIT License
847 stars 28 forks source link

Prevent Keyboard API in ScrollView #143

Closed antpb closed 2 months ago

antpb commented 2 months ago

Summary:

Hi! I am hitting an issue where the keyboard warning keeps popping up no matter what I do and I tracked it down to ScrollView.js.

In https://github.com/callstack/react-native-visionos/pull/71/ it was mentioned that the keyboard api was to be avoided if in visionOS but I think it currently is doing the opposite. I've tested this proposed change in simulator/device and it seems to be good, but maybe I'm understanding this wrong so feel free to close this PR if not! Thanks!

Before:

Screenshot 2024-04-18 at 9 24 33 PM

After:

Screenshot 2024-04-18 at 9 25 00 PM

Test Plan:

To test, add a ScrollView in any app and see that the api error happens. You'll need to make sure metro refreshes the app to see the error since the warn once is currently working as intended.