Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#44986 closed feature request (wontfix)

We should save/update posts in the post.php admin screen when the user presses CTRL + S

Reported by: blackbam's profile Blackbam Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description

Use case: Whenever a user is in the edit.php screen of a post, page or custom post type and wants to save/update. Pressing CTRL + S shortcut is the most natural way of saving / updating content and it will improve and speed up the editing experience in WordPress.

Additional Info: There is a plugin for this functionality already (https://wordpress.org/plugins/save-with-keyboard/). However we should put this into the core as it is a very small thing to change in the core but very useful.

Currently I can not think of any significant drawback implementing this, but a second opinion would be nice nevertheless.

Change History (9)

#1 @mukesh27
7 years ago

  • Component changed from Administration to Editor
  • Focuses accessibility added
  • Type changed from enhancement to feature request

#2 follow-up: @SergeyBiryukov
7 years ago

  • Keywords reporter-feedback added; 2nd-opinion dev-feedback removed

Hi @Blackbam, thanks for the ticket!

Unless I'm missing something, this is already implemented, see #31655. I've just tested Ctrl + S on a clean WordPress install in Opera 55 (Windows), and it does save the current draft. Do you see different results?

Related: #33566

#3 in reply to: ↑ 2 ; follow-up: @Blackbam
7 years ago

Replying to SergeyBiryukov:

Hi @Blackbam, thanks for the ticket!

Unless I'm missing something, this is already implemented, see #31655. I've just tested Ctrl + S on a clean WordPress install in Opera 55 (Windows), and it does save the current draft. Do you see different results?

Related: #33566

Hi @SergeyBiryukov I have tested with Opera 55, Google Chrome 69, and Firefox 62 (all on Linux Mint) and surprisingly indeed it is working in Opera! However the vast majority of users is probably using Google Chrome, Firefox or Microsoft Edge.

Chrome and Firefox are opening either the "save HTML page" dialog or they just ignore the attempt to save.

Not sure if this is still an enhancement or a bug then? But I think we should make this work in all Browsers?

Last edited 7 years ago by Blackbam (previous) (diff)

#4 in reply to: ↑ 3 ; follow-up: @SergeyBiryukov
7 years ago

  • Keywords needs-testing added

Replying to Blackbam:

Not sure if this is still an enhancement or a bug then? But I think we should make this work in all Browsers?

Thanks for the follow-up! Sounds like a bug, I agree it should work consistently across browsers.

Still can't fully reproduce it though. Tested in Chrome 69, Firefox 62, and Edge 42, all on Windows 10.

Ctrl + S works as expected for me in Chrome and Firefox (saves the current draft). Edge appears to ignore it.

#5 in reply to: ↑ 4 @Blackbam
7 years ago

Replying to SergeyBiryukov:

Replying to Blackbam:

Not sure if this is still an enhancement or a bug then? But I think we should make this work in all Browsers?

Thanks for the follow-up! Sounds like a bug, I agree it should work consistently across browsers.

Still can't fully reproduce it though. Tested in Chrome 69, Firefox 62, and Edge 42, all on Windows 10.

Ctrl + S works as expected for me in Chrome and Firefox (saves the current draft). Edge appears to ignore it.

Recently tested with Chrome and Firefox on Linux - not working. Also in Windows I had no results with certain Browsers. Maybe it is just working if the Browser interprets Ctrl + S as "form submission"? It should be made compatible across all keyboard devices with JavaScript.

#6 follow-up: @afercia
6 years ago

  • Focuses accessibility removed
  • Keywords needs-testing removed
  • Version trunk deleted

What the "Save with keyboard" plugin does is a bit different. It triggers a click on the Publish/Update button. In doing so, it also triggers a form submission with consequent page reload. Also, for me it works only after the second Ctrl/Cmd+s press.

Instead, the Ctrl/Cmd+s provided by WordPress saves the post content via AJAX. You won't see a page reload. You can check your browser's dev tools Network tab to see the AJAX request. Also, you will notice the "draft saved" info at the bottom of the classic editor updates:

http://cldup.com/WDaC2DOV0O.png

I can't test on Linux but Ctrl/Cmd+s works for me with all browsers on Windows and macOS. @Blackbam when you have a chance please check there are no JavaScript errors in your browser's dev tools console and please make sure you're testing with all plugins deactivated and a default theme (e.g. Twenty Seventeen). Thanks!

#7 in reply to: ↑ 6 @Blackbam
6 years ago

@afercia Thank you for your input this is a useful clarification regarding this issue.

However for me the draft is not saved if there is no editor, not saved for certain post types and it will not reliably save all the data - three major disadvantages. To save data from Plugins via Ajax will be hard therefore I would suggest to save the whole page contents when pressing Ctrl + S (similarly to the "Save with keyboard" plugin.

What I do not know is if this would still be a good idea for Gutenberg pages.

#9 @pento
6 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

As the functionality is available in the block editor, I'm going to close this ticket.

While the classic editor is still supported for bug fixes, new enhancements generally won't be implemented.

Note: See TracTickets for help on using tickets.