10-16-2017 19:10
10-16-2017 19:10
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.
10-17-2017 10:19
10-17-2017 10:19
There is an issue with onactivate when it's nested inside multiple <svg> elements. Use onclick until this is resolved.
10-17-2017 10:19
10-17-2017 10:19
There is an issue with onactivate when it's nested inside multiple <svg> elements. Use onclick until this is resolved.
10-17-2017 17:17
10-17-2017 17:17
May thanks for the quick response. Tried onclick with the native button and that works. Cheers.