Index: wp-admin/js/page.dev.js =================================================================== --- wp-admin/js/page.dev.js (revision 10513) +++ wp-admin/js/page.dev.js (working copy) @@ -197,8 +197,8 @@ return false; }); - // This code is meant to allow tabbing from Title to Post if tinyMCE is defined. if ( typeof tinyMCE != 'undefined' ) { + // This code is meant to allow tabbing from Title to Post if tinyMCE is defined. $('#title')[$.browser.opera ? 'keypress' : 'keydown'](function (e) { if (e.which == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { if ( ($("#post_ID").val() < 1) && ($("#title").val().length > 0) ) { autosave(); } @@ -210,5 +210,16 @@ } } }); + + // If the user presses Control-S/Command-S, they are likely trying to save the Post, not the browser web page. + // We can override the default key press behavior and autosave for them. + tinyMCE.activeEditor.onKeyDown.add(function(ed, e) { + if(e.which == 83 && e.metaKey) { + e.preventDefault(); + autosave(); + return false; + } + }); } + }); Index: wp-admin/js/post.dev.js =================================================================== --- wp-admin/js/post.dev.js (revision 10513) +++ wp-admin/js/post.dev.js (working copy) @@ -494,8 +494,8 @@ return false; }); - // This code is meant to allow tabbing from Title to Post if tinyMCE is defined. if ( typeof tinyMCE != 'undefined' ) { + // This code is meant to allow tabbing from Title to Post if tinyMCE is defined. $('#title')[$.browser.opera ? 'keypress' : 'keydown'](function (e) { if (e.which == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { if ( ($("#post_ID").val() < 1) && ($("#title").val().length > 0) ) { autosave(); } @@ -507,5 +507,15 @@ } } }); + + // If the user presses Control-S/Command-S, they are likely trying to save the Post, not the browser web page. + // We can override the default key press behavior and autosave for them. + tinyMCE.activeEditor.onKeyDown.add(function(ed, e) { + if(e.which == 83 && e.metaKey) { + e.preventDefault(); + autosave(); + return false; + } + }); } });