From a3db15bb26e89147cbcd341da86dd27c11d8ca30 Mon Sep 17 00:00:00 2001 From: Ella van Dorpe Date: Tue, 1 Nov 2016 20:33:21 +0000 Subject: [PATCH] TinyMCE: wptextpattern: Fix undo shortcut for inline patterns Fixes #37092. git-svn-id: https://develop.svn.wordpress.org/trunk@39077 602fd350-edb4-49c9-b593-d223f7449a82 --- .../js/tinymce/plugins/wptextpattern/plugin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js b/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js index f246918acb..e85a4857c2 100644 --- a/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js @@ -71,12 +71,14 @@ event.stopImmediatePropagation(); } - if ( event.keyCode === VK.ENTER && ! VK.modifierPressed( event ) ) { - enter(); + if ( VK.metaKeyPressed( event ) ) { + return; } + if ( event.keyCode === VK.ENTER ) { + enter(); // Wait for the browser to insert the character. - if ( event.keyCode === VK.SPACEBAR && ! event.ctrlKey && ! event.metaKey && ! event.altKey ) { + } else if ( event.keyCode === VK.SPACEBAR ) { setTimeout( space ); } else if ( event.keyCode > 47 && ! ( event.keyCode >= 91 && event.keyCode <= 93 ) ) { setTimeout( inline );