Fix tabbing out of the title field on Media -> Edit Media screen, fixes #27750
Built from https://develop.svn.wordpress.org/trunk@28069 git-svn-id: http://core.svn.wordpress.org/trunk@27900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
382577bbb7
commit
8072976c06
|
@ -486,15 +486,18 @@ jQuery(document).ready( function($) {
|
|||
|
||||
// This code is meant to allow tabbing from Title to Post content.
|
||||
$('#title').on( 'keydown.editor-focus', function( event ) {
|
||||
var editor;
|
||||
var editor, textarea;
|
||||
|
||||
if ( event.keyCode === 9 && ! event.ctrlKey && ! event.altKey && ! event.shiftKey ) {
|
||||
editor = typeof tinymce != 'undefined' && tinymce.get('content');
|
||||
$textarea = $('#content');
|
||||
|
||||
if ( editor && ! editor.isHidden() ) {
|
||||
editor.focus();
|
||||
} else if ( $textarea.length ) {
|
||||
$textarea.focus();
|
||||
} else {
|
||||
$('#content').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue