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

Nested artboard button not working at runtime #229

Closed
BitBarrel opened this issue Mar 22, 2024 · 5 comments
Closed

Nested artboard button not working at runtime #229

BitBarrel opened this issue Mar 22, 2024 · 5 comments

Comments

@BitBarrel
Copy link

Description

I have a nested artboard button using events, inputs, and listeners. It works in the editor but it doesn't work with React Native on Android.

Provide a Repro

See the attached riv and rev.

Expected behavior

I have a nested artboard button that works in the editor but not in runtime (react native). The button works with listeners, inputs, and events. See the attached file. Open the artboard called “Button issue” and try to click any of the buttons. You will see that the buttons on the left remain pressed down if you click-press-hold. The other buttons are radio buttons (only one at a time can be pressed). Now try this on react native on Android and you will see that none of the buttons work.

nested_bug.zip

@HayesGordon
Copy link
Contributor

Hi @BitBarrel, are you using the latest version of the Rive React Native runtime? And is this working on iOS but not on Android?

Something that you should also ensure is passing the correct State Machine Name as a property (to ensure the correct state machine is playing).

If you're still seeing an issue then please note that it may just require using the latest version of Rive Android. The React Native runtime is a little behind our latest Android + iOS runtimes. We're resolving a few issues here to update to the latest. Once that is done, this should be fixed.

@BitBarrel
Copy link
Author

Let me check with my software engineer and get back to you.

@BitBarrel
Copy link
Author

HayesGordon
The buttons 1234 on WebJS also don't work:

https://codesandbox.io/p/sandbox/rive-quick-start-js-forked-j5znq2?file=%2Fsrc%2Findex.mjs

Does this mean it is not a react native problem but instead it is a bug in The Rive logic which is platform-wide?

@BitBarrel
Copy link
Author

BitBarrel commented Mar 30, 2024

We are using the latest version of the Rive react runtime. The problem exists both on IOS and Android (and Web JS).

Getting the Android only version to work without React Native is going to be a bit hacky so we will wait for an update which hopefully will fix the issue.

Edit:
With the latest version of Web JS canvas the nested input buttons work correctly.

With IOS, the behaviour of the buttons is different than with Android. Double tap activates a button press but single tap doesn't.

Also, on IOS, button presses affect non-related inputs of other buttons. Maybe a memory leak?

There is something wrong with the way React Native and Rive handles input.

@HayesGordon
Copy link
Contributor

Hi @BitBarrel , this should now be fixed as React Native is now updated with the latest iOS and Android runtimes. Rive ReactNative v7.0.0

Closing this issue but please feel free to reopen if you're encountering difficulties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants