fixes issue where tab was selected after close, changes subitems to
block, automatically closes popup on subitem click