Sidebar onItemClick doesn't trigger if collapsed

onItemClick works for subitems when the sidebar is expanded, but once collapsed, it stops working for subitems. Can this be fixed or worked around? I don’t want to use onAfterSelect because sometimes I am setting the selected item based on url change and not user interaction.

Try this: You’ll see that you get both Selected and Clicked events when expanded, but when collapsed, you only get Selected events for sub-items.

http://webix.com/snippet/fa06cde4

The point is that subitems of the collapsed sidebar are bounded as the list inside the popup.

So the onItemClick event should be attached to this list:

http://webix.com/snippet/1875072b

Thank you! This is what I was trying to figure out. You’re very helpful.