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:
Andrew Ozz 2014-04-10 22:10:15 +00:00
parent 382577bbb7
commit 8072976c06
2 changed files with 6 additions and 3 deletions

View File

@ -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