Editor: Exclude shift from modifier keys when handling spacebar shortcuts.

Patterns that activate on enter are still canceled with any modifier active.

Props azaozz.
Fixes #33382.



git-svn-id: https://develop.svn.wordpress.org/trunk@33622 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland 2015-08-17 14:50:42 +00:00
parent e33ff607e6
commit eea1678cd3

View File

@ -44,12 +44,10 @@
}, true );
editor.on( 'keyup', function( event ) {
if ( ! VK.modifierPressed( event ) ) {
if ( event.keyCode === VK.SPACEBAR ) {
space();
} else if ( event.keyCode === VK.ENTER ) {
enter();
}
if ( event.keyCode === VK.SPACEBAR && ! event.ctrlKey && ! event.metaKey && ! event.altKey ) {
space();
} else if ( event.keyCode === VK.ENTER && ! VK.modifierPressed( event ) ) {
enter();
}
} );