You can cancel in a page or in a dialog box. The behavior is similar in both environments.
When the canceling process is completed, the dialog box is closed and all modifications are canceled.