remove contextmenu when switching view