When I am editing a form and need to close a pop up window, the Field Type for example, I am in the habit of hitting esc and that closes not only that pop up window but also closes the entire edit form section without saving any changes that have been made.
I'd recommend either disabling that function, or adding a box that asks us to confirm if we want to exit the form edit when esc is pressed.