[#50928529] fixed the menu behaviour to disappear when clicking a button and clicking outside the menu.