Customizer: Add keyup events to sync textarea values. Props koopersmith. fixes #20879
git-svn-id: https://develop.svn.wordpress.org/trunk@21024 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8fac41f47a
commit
5abcaa52d7
|
@ -573,6 +573,9 @@
|
|||
|
||||
// Prevent the form from saving when enter is pressed.
|
||||
$('#customize-controls').on( 'keydown', function( e ) {
|
||||
if ( $( e.target ).is('textarea') )
|
||||
return;
|
||||
|
||||
if ( 13 === e.which ) // Enter
|
||||
e.preventDefault();
|
||||
});
|
||||
|
|
|
@ -406,6 +406,8 @@ if ( typeof wp === 'undefined' )
|
|||
synchronizer = api.Element.synchronizer[ type ];
|
||||
if ( 'text' === type || 'password' === type )
|
||||
this.events += ' keyup';
|
||||
} else if ( this.element.is('textarea') ) {
|
||||
this.events += ' keyup';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue