Customizer: Add keyup events to sync textarea values. Props koopersmith. fixes #20879
git-svn-id: http://core.svn.wordpress.org/trunk@21024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
882813ef82
commit
6e0e62a063
|
@ -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