TinyMCE: fix the TinyMCE help modal keyboard shortcut on Mac for the classic editor and classic block.
Fixes #45791. git-svn-id: https://develop.svn.wordpress.org/trunk@44913 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
02d3de004c
commit
353bfb5e7a
@ -679,7 +679,15 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||
|
||||
// Workaround for not triggering the global help modal in the Block Editor by the Classic Block shortcut.
|
||||
editor.on( 'keydown', function( event ) {
|
||||
if ( event.shiftKey && event.altKey && event.code === 'KeyH' ) {
|
||||
var match;
|
||||
|
||||
if ( tinymce.Env.mac ) {
|
||||
match = event.ctrlKey && event.altKey && event.code === 'KeyH';
|
||||
} else {
|
||||
match = event.shiftKey && event.altKey && event.code === 'KeyH';
|
||||
}
|
||||
|
||||
if ( match ) {
|
||||
editor.execCommand( 'WP_Help' );
|
||||
event.stopPropagation();
|
||||
event.stopImmediatePropagation();
|
||||
|
Loading…
x
Reference in New Issue
Block a user