mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 07:07:04 +00:00
Application Passwords: Allow enter key to submit profile form.
Fix the enter key in profile form fields moving focus to the application password input instead of submitting the profile update for. Replace the submit button type used for application passwords with `button type="button"` and ensure that the enter key's native behavior isn't overwritten. props audrasjb, alexstine, promz, sabernhardt. Fixes #52849. git-svn-id: https://develop.svn.wordpress.org/trunk@51086 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -150,6 +150,13 @@
|
||||
} );
|
||||
} );
|
||||
|
||||
$newAppPassField.on( 'keypress', function ( e ) {
|
||||
if ( 13 === e.which ) {
|
||||
e.preventDefault();
|
||||
$newAppPassButton.trigger( 'click' );
|
||||
}
|
||||
} );
|
||||
|
||||
// If there are no items, don't display the table yet. If there are, show it.
|
||||
if ( 0 === $appPassTbody.children( 'tr' ).not( $appPassTrNoItems ).length ) {
|
||||
$appPassTwrapper.hide();
|
||||
|
||||
Reference in New Issue
Block a user