You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_addEventListeners function has two functions to prevent default link actions.
event.preventDefault()
event.stopPropagation()
If link element is not used for toggle, disabling events are not nesessary at all?
Reason is i need attach events to all toggle elements to get click events wanted from toggle elements.
Better way is to attach single event listener to parent and use event.target, this is not working now.
Is it possible to add check if toggle element is link, then add those events something like: if(this._element.nodeName == 'a'){ event.preventDefault(); event.stopPropagation(); }
or using data attribute to disable/enable bubling.