Customize: Use `keydown` instead of `keyup` for listening for enter key to add page stub via dropdown-pages control.

Fixes issue with Japanese input.

Props miyauchi.
Amends [38906].
See #34923.
Fixes #42233.


git-svn-id: https://develop.svn.wordpress.org/trunk@41873 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-10-16 07:56:28 +00:00
parent 850db3c6a0
commit 8661837eb9
1 changed files with 1 additions and 1 deletions

View File

@ -3542,7 +3542,7 @@
control.container.on( 'click', '.add-content', function() {
control.addNewPage();
});
control.container.on( 'keyup', '.create-item-input', function( e ) {
control.container.on( 'keydown', '.create-item-input', function( e ) {
if ( 13 === e.which ) { // Enter
control.addNewPage();
}