Opened 2 years ago
Last modified 18 months ago
#17133 new enhancement
Register ctrl + s event for plugin/theme editor
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Administration | Version: | 3.1 |
| Severity: | minor | Keywords: | ux-feedback has-patch needs-refresh |
| Cc: | chacha102 |
Description
Often when modifying code or writing a post using the wordpress editor I instinctively hit ctrl + s to save it. Up pops the save website dialog which I then have to close. In Gmail when I hit ctrl+ s it saves the email to drafts. I think a similar thing would be useful for wordpress.
Attachments (1)
Change History (10)
So it has - for new posts. Could this feature be implemented for the plugin/theme editor also.
- Keywords 2nd-opinion removed
- Summary changed from Register ctrl + s event for editors to Register ctrl + s event for plugin/theme editor
- Milestone changed from Awaiting Review to Future Release
Sounds like a no-brainer. +1
comment:5
andrewryno — 2 years ago
Would it also be worth it to expand this to register on all editors that have a "Save" button? For example, I was just thinking of widgets. I type a lot of HTML code in there and I automatically would try to save using the keyboard shortcut.
comment:7
SergeyBiryukov — 21 months ago
- Keywords has-patch added; needs-patch removed
comment:8
evansolomon — 21 months ago
I changed the submit button ID because jQuery's submit() function does not work on forms where the button has the ID "submit". Alternatively we could leave the name and use click(), but this seemed like a cleaner option.
- Keywords needs-refresh added
I like this and really can't think of a reason not to implement this. I actually hit CMD+S all the time on these editor pages when making quick fixes and get really annoyed when the Save As Web Page dialog comes up.
I tested Evan's patch. It works in FF, Chrome, and Safari on OS X, but not any browsers on Windows (the Save As dialog pops up).
Surprisingly it works within IE in IETester, so it must register the CTRL+S on some level.

See #5598