Skip to content

[6.x] Make the save and close keyboard shortcut consistent - #15619

Merged
jackmcdade merged 12 commits into
6.xfrom
15619-consistent-save-and-close-shortcut
Oct 13, 2026
Merged

jackmcdade merged 12 commits into
6.xfrom
15619-consistent-save-and-close-shortcut

Conversation

@jaygeorge

Copy link
Copy Markdown
Contributor

When you open a related entry or term from an Entries or Terms field, Cmd+S saves it but leaves the stack open. Field settings already use Cmd+Shift+S to save and close, so this brings the same shortcut to entries and terms opened in a stack.

  • Cmd+Shift+S (Ctrl+Shift+S on Windows) saves and closes the stack. If the save fails, the stack stays open so you can see the errors.
  • The Save button in the stack has a tooltip with the shortcut: "Save & Close (Cmd+Shift+S)".
  • The Save All tooltip in field settings now uses the same wording: "Save All (Cmd+Shift+S)".
  • Full-page entry and term forms are unchanged.

To try it, open a related entry from an Entries field and press Cmd+Shift+S.

- Bind Cmd+S in the asset editor to save and close
- Wait for save before navigating so the saved event isn't dropped
- Don't close the editor when an asset is saved during navigation
- Guard next/previous against overlapping saves
- Test navigation waits for save
- Cmd+S closes the child editor instead of the asset editor
@jasonvarga

Copy link
Copy Markdown
Member

Is this really what we want?

Personally I'd expect cmd+s to "quick-save", i.e. just save and let you continue where you are. Don't close/navigate.

@jackmcdade ?

(I know I just merged #15618 which closes the asset editor. Maybe hastily)

@jasonvarga

Copy link
Copy Markdown
Member

Or maybe cmd+s to save and close when in a stack is intentional ux?

@jaygeorge

Copy link
Copy Markdown
Contributor Author

@jasonvarga I think you may have misread - cmd + s hasn't changed. I've added cmd + *shift* + s to save and close, similar to the blueprints.

I'm going to look at all the shortcuts though, to make sure we're applying these consistently…

- Asset editor: Cmd+S saves and stays open, Cmd+Shift+S saves and closes
- Focal point and crop handle Cmd+Shift+S so it doesn't fall through to the asset editor
- Inline user form: Cmd+Shift+S saves and closes, and its Cmd+S binding is now cleaned up on unmount
- Save & Close tooltips on the asset editor, inline user and field settings primary buttons
…and-close-shortcut

# Conflicts:
#	resources/js/components/assets/Editor/CropEditor.vue
#	resources/js/components/assets/Editor/Editor.vue
#	resources/js/components/assets/Editor/FocalPointEditor.vue
#	resources/js/tests/components/assets/Editor.test.js
@jaygeorge

jaygeorge commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

OK I see now, #15618 results in cmd + s closing the modal too, which it probably shouldn't do.

I ran an audit on the whole CP, and this seems to be the pattern we should be following:

cmd + s in stacks

  • For narrow stacks, cmd + s should save and close.
  • For full stacks, cmd + s should save and keep the stack open, with cmd + shift + s to save and close. The button should have a tooltip hinting at the extra shortcut.
  • For full stacks creating something new, cmd + s should save and close, since the create form has nothing left to do once the thing exists.

Current inconsistencies

Where 6.x Inconsistency What this PR fixes
Edit an entry with an Assets field → click an asset → edit Alt Text → cmd + s (same for Bard images and the asset browser) Saves & closes Full stack editing something, so it should stay open cmd + s saves and stays open; cmd + shift + s saves & closes; tooltip on Save
Edit an entry with an Entries field → link an entry → click its title → edit a field → cmd + s Stays open No cmd + shift + s, no tooltip on Save Adds cmd + shift + s to save & close; tooltip on Save
Edit an entry with a Terms field → link a term → click its title → edit a field → cmd + s Stays open No cmd + shift + s, no tooltip on Save Adds cmd + shift + s to save & close; tooltip on Save
Edit an entry with a Users field → select a user → click their name → edit a field → cmd + s (needs an elevated session) Stays open No cmd + shift + s, no tooltip on Save. After closing, cmd + s still goes to the closed user form Adds cmd + shift + s to save & close; tooltip on Save; cmd + s goes back to the entry after closing
Edit a blueprint → click a top-level field → change Display → cmd + s Stays open; cmd + shift + s closes No tooltip on Save Adds tooltip "Save & Close (Cmd+Shift+S)" on Save
Edit a blueprint → click a Replicator field → click a field inside one of its sets → hover Save All Stays open; cmd + shift + s closes all Tooltip says just "Cmd+Shift+S", unlike the others Tooltip now reads "Save All (Cmd+Shift+S)"
Edit an asset → Focal Point or Crop → cmd + shift + s Nothing No save & close shortcut Focal point applies, saves & closes the asset editor; crop finishes the crop

@jackmcdade
jackmcdade merged commit 34fa385 into 6.x Oct 13, 2026
64 checks passed
@jackmcdade
jackmcdade deleted the 15619-consistent-save-and-close-shortcut branch October 13, 2026 19:30
@jackmcdade

Copy link
Copy Markdown
Member

Thanks for the thoroughness here. You definitely nailed the convention. It's nice to have that be more conceptually consistent now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants