Opened 10 years ago
Closed 9 years ago
#31655 closed defect (bug) (fixed)
Cmd+S needs to work in text view of post editor
Reported by: | krogsgard | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | ux-feedback |
Focuses: | ui, accessibility, javascript | Cc: |
Description
Cmd/Control+S works in the visual editor, but not the text view of the WordPress post editor. It should work in either. If you do cmd+S in text view, it prompts to save a file. This is not preferred.
Attachments (1)
Change History (18)
#2
@
9 years ago
- Focuses javascript added
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Version 4.1 deleted
#4
@
9 years ago
- Keywords dev-feedback added
Something like this should work
document.addEventListener("keydown", function(e) { if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) { e.preventDefault(); // Process save } }, false);
i believe this should fix things.. but seeing the core uses keypress i cant seem to be able to find where the save is being made in the admin js files. Can someone point me to the file and line number where this is being done.
This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.
9 years ago
This ticket was mentioned in Slack in #core by azaozz. View the logs.
9 years ago
#7
follow-up:
↓ 13
@
9 years ago
I wonder if the user will then expect everything on the page to save. At the moment your cursor needs to be in the visual editor to use it and it will only save the main fields. Should it work for the whole page, or only when the cursor is in one of the editors?
#8
@
9 years ago
Thinking this should work the same as in the Visual editor, i.e. run autosave.
Can enhance it to include other content after we decide what we are going to do for #7756. If we go with:
$form.attr( 'target', 'some-hidden-iframe' ).submit().attr( 'target', '' );
we wouldn't need anything more.
This ticket was mentioned in Slack in #core by obenland. View the logs.
9 years ago
#12
@
9 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 32680:
#13
in reply to:
↑ 7
;
follow-up:
↓ 14
@
9 years ago
- Focuses accessibility added
- Keywords ux-feedback added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to iseulde:
I wonder if the user will then expect everything on the page to save. At the moment your cursor needs to be in the visual editor to use it and it will only save the main fields. Should it work for the whole page, or only when the cursor is in one of the editors?
This is a concern. There's no reason for this only to trigger while focus is in the editor, and performing an autosave isn't what I'd expect from cmd+S (although #7756 would address this in the longer term).
TIL that cmd/ctrl+S was quietly introduced for autosave in the editor back in #24067.
cmd+S should perform a complete save, and should trigger regardless of where the focus is on the page.
Tagging accessibility because I know that custom keyboard shortcuts potentially have an accessibility impact.
#14
in reply to:
↑ 13
;
follow-up:
↓ 15
@
9 years ago
Replying to johnbillion:
cmd+S should perform a complete save, and should trigger regardless of where the focus is on the page.
You want cmd+s to trigger a full page reload? I still press cmd+s compulsively even though it's not 1998 anymore, surely I can't be the only one. Having it go full-page-reload would drive me to tears, and curious what it would do for a published post, then.
#15
in reply to:
↑ 14
@
9 years ago
Replying to helen:
Replying to johnbillion:
cmd+S should perform a complete save, and should trigger regardless of where the focus is on the page.
You want cmd+s to trigger a full page reload? I still press cmd+s compulsively even though it's not 1998 anymore, surely I can't be the only one. Having it go full-page-reload would drive me to tears, and curious what it would do for a published post, then.
It should probably be dependent on #7756. Once we've changed to saving without a page reload, it won't be so intrusive to the user.
I can't save in Visual or Text mode with
Command+S
, both prompt a file save. What browser are you using? I tested in Chrome, Safari, and Firefox running OSX.