I have two "screens" and am using the Showing/Hiding an Element approach which is working. Events attached to square button components on the second screen (which is display:none to start) do not fire. No issues with square buttons on the first display:inline screen when the app loads.
If I console.log out a button on the second screen on start up then it isn't null. It is being found. The activate event is just not being attached. I tried attaching the events after I toggle the display properties to see if the event will only attach once that screen is visible, but nothing happens. No errors. No activate event.
If I swap the square button to a rect and add an onclick event then it works, but I was hoping to use the native buttons.
Answered! Go to the Best Answer.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
There is an issue with onactivate when it's nested inside multiple <svg> elements. Use onclick until this is resolved.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
May thanks for the quick response. Tried onclick with the native button and that works. Cheers.
Best Answer