# Save, discard and undo
How the Unsaved changes bar, Discard, Keep editing and Undo work on every form in the dashboard.
Every form in the dashboard follows the same rules for edits, so you never lose work without being asked first. This page lists what you see in each case.
## Use the Unsaved changes bar
1. Change a field on a settings page or in an editor. The **Unsaved changes** bar appears with **Discard** and **Save changes**.
2. Choose **Save changes**, or press **Cmd+S** on a Mac or **Ctrl+S** on Windows and Linux.
3. To go back to the last saved version, choose **Discard**. Some forms ask **Discard changes?** first, with **Discard** and **Keep editing**.
```screenshot getting-started/save-discard-and-undo/01-save-bar
alt: A settings form with an edited field and the Unsaved changes bar showing Discard and Save changes
caption: The bar appears as soon as a form has unsaved edits.
```
```screenshot getting-started/save-discard-and-undo/02-save-bar-phone
alt: The Unsaved changes bar on a phone, above the bottom of the screen
caption: The same bar on a phone.
frame: phone
```
## Leaving a page with unsaved edits
If you open another page or close the tab with unsaved edits, Crate asks first. Choose **Keep editing** to stay, or **Leave without saving** to go.
A dialog with unsaved edits, such as **New product**, also asks before it closes. On a phone, the back button closes a dialog the same way. See [Use the dashboard on your phone](/docs/getting-started/using-the-dashboard-on-mobile).
## Restore a deleted item
After some deletes and removals, a message appears with **Undo**. Choose it before the message goes away to bring the item back.
## What happens in each case?
| Situation | What you see | What you do |
| --- | --- | --- |
| You edit a field | **Unsaved changes** with **Discard** and **Save changes** | Save or discard |
| You discard on a form that asks first | **Discard changes?** with **Discard** and **Keep editing** | Confirm or keep editing |
| You close a dialog that has edits | The dialog asks before it closes | Save, or confirm the close |
| You open another page or close the tab | **Leave without saving** and **Keep editing** | Stay and save, or leave |
| You delete or remove an item | A message with **Undo** | Choose **Undo** to restore it |
| An app update is ready | **Update Crate and discard unsaved changes?** if you have edits | Save first, then refresh |
> [!NOTE]
> Some editors save as you type and show a saved state instead of the bar. The storefront editor also has its own undo and redo for design changes.
## Which keys can I use?
| Keys | Action |
| --- | --- |
| **Cmd+S** or **Ctrl+S** | Save the form you are editing |
| **Esc** | Close the open dialog or menu |
| **Cmd+K** or **Ctrl+K** | Open dashboard search. See [Search your dashboard](/docs/getting-started/search-the-dashboard). |
## Work with a dialog or date picker
**Escape**, **Cancel** and the backdrop request dismissal. If an unsaved-change check refuses closing, the dialog and its open calendar stay available. Correct rejected fields and save again; dismissal is not a save.
Where supported, **Cmd+Enter** or **Ctrl+Enter** submits the active dialog's eligible form. A disabled or saving action remains unavailable. On a phone, an enhanced calendar opens in a drawer; closing its owning sheet also closes that calendar. Disabled or read-only date fields cannot be edited.
Clearing a selected picker value deliberately requests an empty value. Search text is not a selection. If a form requires a value, choose a valid result before saving. Numeric arrow controls follow the field's allowed increments and bounds. Individual forms still decide which empty values and amounts are valid.
## Troubleshooting
- **Nothing asks before I leave:** the page has no unsaved edits. A field you changed and then changed back counts as saved.
- **The Undo message has gone:** it shows for a short time only. Add the item again, or restore it from its page if that page offers it.
- **Save changes is greyed out:** the form is still saving, or nothing has changed yet.
