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

Fixes #45791.
Built from https://develop.svn.wordpress.org/trunk@44913


git-svn-id: http://core.svn.wordpress.org/trunk@44744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2019-03-15 21:43:50 +00:00
parent c84bb94796
commit cd01464b52
4 changed files with 12 additions and 4 deletions

View File

@ -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();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-alpha-44912';
$wp_version = '5.2-alpha-44913';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.