I have a modal that displays the details of an user or product (view mode). You can click the edit button to show the form (edit mode).
Pressing Cancel will bring you back to View mode. And clicking close will close the modal (same as clicking X).
I'm not sure if this is good UI/UX. I guess I'm worried that the user will think that Cancel actually closes the modal. Or maybe that won't be an issue since they will eventually see the Close button anyway?