Confirmation cancel discards
confirmation-cancel-discards
Confirmation Cancel discards — touching Cancel cancels the action, discards any changes, and closes. (Example: listen to ringtones; commit only on OK.)
Description
On confirmation dialogs, Cancel cancels the action, discards any changes, and closes. Commit happens only on the confirm control—for example previewing ringtones and committing only on OK. Cancel that keeps edits or that commits confuses the meaning of discard. Fail if Confirmation Cancel keeps changes, or if Cancel itself commits. Apply when wiring Cancel and confirm on dialogs with pending changes.
When to use
Wiring Cancel and confirm actions on a confirmation dialog with pending changes.
Not when
Not for informational dialogs with a single dismiss and no pending edits.
Agent hint
Make Cancel discard and close; commit only on the confirm control.
Confirmation Cancel discards changes and closes; commit is only on the confirm control.
Confirmation Cancel keeps changes, or Cancel commits.
Citations
MUI — Dialog
https://mui.com/material-ui/react-dialog/