mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01: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:
parent
e33ff607e6
commit
eea1678cd3
@ -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();
|
||||
}
|
||||
} );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user