WordPress.org

Make WordPress Core

Changeset 28069


Ignore:
Timestamp:
04/10/2014 10:09:50 PM (6 years ago)
Author:
azaozz
Message:

Fix tabbing out of the title field on Media -> Edit Media screen, fixes #27750

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/post.js

    r27951 r28069  
    487487    // This code is meant to allow tabbing from Title to Post content.
    488488    $('#title').on( 'keydown.editor-focus', function( event ) {
    489         var editor;
     489        var editor, textarea;
    490490
    491491        if ( event.keyCode === 9 && ! event.ctrlKey && ! event.altKey && ! event.shiftKey ) {
    492492            editor = typeof tinymce != 'undefined' && tinymce.get('content');
     493            $textarea = $('#content');
    493494
    494495            if ( editor && ! editor.isHidden() ) {
    495496                editor.focus();
    496             } else {
    497                 $('#content').focus();
     497            } else if ( $textarea.length ) {
     498                $textarea.focus();
     499            } else {
     500                return;
    498501            }
    499502
Note: See TracChangeset for help on using the changeset viewer.