Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Show / Hide & Events

ANSWERED

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.

Best Answer
1 BEST ANSWER

Accepted Solutions

There is an issue with onactivate when it's nested inside multiple <svg> elements. Use onclick until this is resolved.

View best answer in original post

Best Answer
2 REPLIES 2

There is an issue with onactivate when it's nested inside multiple <svg> elements. Use onclick until this is resolved.

Best Answer

May thanks for the quick response. Tried onclick with the native button and that works. Cheers.

Best Answer
0 Votes