Changeset 27757
- Timestamp:
- 03/26/2014 10:55:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r27540 r27757 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 or select element. 922 922 $('#customize-controls').on( 'keydown', function( e ) { 923 if ( $( e.target ).is('textarea') )924 return;925 926 if ( 13 === e.which ) // Enter923 var isEnter = ( 13 === e.which ), 924 $el = $( e.target ); 925 926 if ( isEnter && ( $el.is( 'input:not([type=button])' ) || $el.is( 'select' ) ) ) { 927 927 e.preventDefault(); 928 } 928 929 }); 929 930
Note: See TracChangeset
for help on using the changeset viewer.