hiding submenu containers when all children are hidden