Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix tabbing from the title to the editor on the Edit Post screen, see…

… #21173

git-svn-id: http://core.svn.wordpress.org/trunk@21586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 82d27641a592367cc8e0eb78333a72781952e0a3 1 parent 7515511
Andrew Ozz authored
Showing with 8 additions and 5 deletions.
  1. +8 −5 wp-includes/js/autosave.dev.js
View
13 wp-includes/js/autosave.dev.js
@@ -96,8 +96,8 @@ jQuery(document).ready( function($) {
$('input#wp-preview').val('');
}
- // This code is meant to allow tabbing from Title to Post content.
- $('#title').bind('keydown.editor-focus', function(e) {
+ // This code is meant to allow tabbing from Title to Post content.
+ $('#title').on('keydown.editor-focus', function(e) {
var ed;
if ( e.which != 9 )
@@ -107,10 +107,13 @@ jQuery(document).ready( function($) {
if ( typeof(tinymce) != 'undefined' )
ed = tinymce.get('content');
- if ( ed && !ed.isHidden() )
- $('#content_tbl td.mceToolbar > a').focus();
- else
+ if ( ed && !ed.isHidden() ) {
+ $(this).one('keyup', function(e){
+ $('#content_tbl td.mceToolbar > a').focus();
+ });
+ } else {
$('#content').focus();
+ }
e.preventDefault();
}
Please sign in to comment.
Something went wrong with that request. Please try again.