Make WordPress Core

Changeset 30986


Ignore:
Timestamp:
12/22/2014 09:30:16 PM (9 years ago)
Author:
azaozz
Message:

TinyMCE wpView: when clicking on the Edit button, move the focus back to the editor before opening the modal. This is needed for IE so TinyMCE can save the proper DOM "bookmark", and makes it possible to move the focus to the modal after it is opened.
See #30817.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js

    r30694 r30986  
    331331                if ( ( event.type === 'touchend' || event.type === 'mousedown' ) && ! event.metaKey && ! event.ctrlKey ) {
    332332                    if ( editor.dom.hasClass( event.target, 'edit' ) ) {
     333
     334                        // In IE need to transfer focus from the non-editable view back to the editor.
     335                        if ( Env.ie ) {
     336                            editor.focus();
     337                        }
     338
    333339                        wp.mce.views.edit( view );
    334                         editor.focus();
    335340                        return false;
    336341                    } else if ( editor.dom.hasClass( event.target, 'remove' ) ) {
Note: See TracChangeset for help on using the changeset viewer.