Added support for collapse the menu when clicking in the overlay.