change menu-appearing event from click to contextmenu.