WIP: fixed tab switching events and labeling of the dropdown tab (now matches the selected tab if the selected tab is a child)