Giorgio Draghetti
Posts: 0
Joined: Mon Oct 27, 2014 12:13 pm

ListItem onclick is activated by click on a Toogle component

Image

I have a Toggle component inside the content area of a Collapsible that is inside a ListItem (see image).
When i click the Toggle component, will be activated the onclick event of the ListItemComponent. I don't want this happen.

Is it possible to overcome this behaviour?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

ListItem onclick is activated by click on a Toogle component

This is bubbling effect: http://javascript.info/tutorial/bubbl...

You can write some storage variable on toggle's click event and check it on listitem's click event. E.g. run JS only if this value=false

Return to “Issues”