Close the menu when clicking on a widget