Make WordPress Core

Changeset 37003


Ignore:
Timestamp:
03/16/2016 02:47:29 AM (10 years ago)
Author:
azaozz
Message:

Editor: fix exiting DFW with the keyboard shortcut on Mac (Opt+Ctrl+W).

Fixes #36222.

File:
1 edited

Legend:

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

    r36973 r37003  
    888888
    889889                function fadeOut( event ) {
    890                         var key = event && event.keyCode;
    891 
    892                         // fadeIn and return on Escape and keyboard shortcut Alt+Shift+W.
    893                         if ( key === 27 || ( key === 87 && event.altKey && event.shiftKey ) ) {
     890                        var isMac,
     891                                key = event && event.keyCode;
     892
     893                        if ( window.navigator.platform ) {
     894                                isMac = ( window.navigator.platform.indexOf( 'Mac' ) > -1 );
     895                        }
     896
     897                        // fadeIn and return on Escape and keyboard shortcut Alt+Shift+W and Ctrl+Opt+W.
     898                        if ( key === 27 || ( key === 87 && event.altKey && ( ( ! isMac && event.shiftKey ) || ( isMac && event.ctrlKey ) ) ) ) {
    894899                                fadeIn( event );
    895900                                return;
Note: See TracChangeset for help on using the changeset viewer.