~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-admin/js/editor-expand.js

  • Committer: Nick Moffitt
  • Date: 2016-04-14 10:43:32 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: nick.moffitt@canonical.com-20160414104332-61kvsia27qpmjquk
new upstream release 4.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
887
887
                }
888
888
 
889
889
                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 ) ) ) ) {
894
899
                                fadeIn( event );
895
900
                                return;
896
901
                        }
1143
1148
                        } );
1144
1149
 
1145
1150
                        editor.addCommand( 'wpToggleDFW', toggle );
1146
 
                        editor.addShortcut( 'alt+shift+w', '', 'wpToggleDFW' );
 
1151
                        editor.addShortcut( 'access+w', '', 'wpToggleDFW' );
1147
1152
                } );
1148
1153
 
1149
1154
                $document.on( 'tinymce-editor-init.focus', function( event, editor ) {