mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-04 12:01:40 +00:00
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:
@@ -44,12 +44,10 @@
|
|||||||
}, true );
|
}, true );
|
||||||
|
|
||||||
editor.on( 'keyup', function( event ) {
|
editor.on( 'keyup', function( event ) {
|
||||||
if ( ! VK.modifierPressed( event ) ) {
|
if ( event.keyCode === VK.SPACEBAR && ! event.ctrlKey && ! event.metaKey && ! event.altKey ) {
|
||||||
if ( event.keyCode === VK.SPACEBAR ) {
|
space();
|
||||||
space();
|
} else if ( event.keyCode === VK.ENTER && ! VK.modifierPressed( event ) ) {
|
||||||
} else if ( event.keyCode === VK.ENTER ) {
|
enter();
|
||||||
enter();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user