Fix opening contextmenu issue