TinyMCE: wptextpattern: fix for fast typing

Props jnylen0, iseulde.

Fixes #36585.



git-svn-id: https://develop.svn.wordpress.org/trunk@37668 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ella Iseulde Van Dorpe
2016-06-09 19:06:25 +00:00
parent 363533d9b3
commit 644795a9dc
2 changed files with 20 additions and 7 deletions
@@ -62,15 +62,14 @@
if ( event.keyCode === VK.ENTER && ! VK.modifierPressed( event ) ) {
enter();
}
}, true );
editor.on( 'keyup', function( event ) {
// Wait for the browser to insert the character.
if ( event.keyCode === VK.SPACEBAR && ! event.ctrlKey && ! event.metaKey && ! event.altKey ) {
space();
setTimeout( space );
} else if ( event.keyCode > 47 && ! ( event.keyCode >= 91 && event.keyCode <= 93 ) ) {
inline();
setTimeout( inline );
}
} );
}, true );
function inline() {
var rng = editor.selection.getRng();