Ticket #26633: 26633.patch
File 26633.patch, 836 bytes (added by , 11 years ago) |
---|
-
src/wp-admin/js/customize-controls.js
918 918 body = $( document.body ), 919 919 overlay = body.children('.wp-full-overlay'); 920 920 921 // Prevent the form from saving when enter is pressed .921 // Prevent the form from saving when enter is pressed on an input element. 922 922 $('#customize-controls').on( 'keydown', function( e ) { 923 if ( $( e.target ).is('textarea') )924 return;923 var isEnter = ( 13 === e.which ), 924 $el = $( e.target ); 925 925 926 if ( 13 === e.which ) // Enter926 if ( isEnter && ( $el.is( 'input:not([type=button])' ) || $el.is( 'select' ) ) ) { 927 927 e.preventDefault(); 928 } 928 929 }); 929 930 930 931 // Initialize Previewer