handle menuitem on edit