Make WordPress Core

Changeset 44913


Ignore:
Timestamp:
03/15/2019 09:42:48 PM (8 years ago)
Author:
azaozz
Message:

TinyMCE: fix the TinyMCE help modal keyboard shortcut on Mac for the classic editor and classic block.

Fixes #45791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js

    r44832 r44913  
    680680                // Workaround for not triggering the global help modal in the Block Editor by the Classic Block shortcut.
    681681                editor.on( 'keydown', function( event ) {
    682                         if ( event.shiftKey && event.altKey && event.code === 'KeyH' ) {
     682                        var match;
     683
     684                        if ( tinymce.Env.mac ) {
     685                                match = event.ctrlKey && event.altKey && event.code === 'KeyH';
     686                        } else {
     687                                match = event.shiftKey && event.altKey && event.code === 'KeyH';
     688                        }
     689
     690                        if ( match ) {
    683691                                editor.execCommand( 'WP_Help' );
    684692                                event.stopPropagation();
Note: See TracChangeset for help on using the changeset viewer.