improve mouse handling on the menu
update menu sample