]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
Wordpress 4.6
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wptextpattern / plugin.js
index d68904afb1084c037ba8f4318967221a94d56ca8..5f3ff1a827f88b18198653cb1e30f29b47e1b651 100644 (file)
                        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();