Hitting return when adding a new category from the category meta box should add the new category, not submit the post form. props wojtek.szkutnik, fixes #14312.
git-svn-id: https://develop.svn.wordpress.org/trunk@21970 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
65804be624
commit
a7175db279
@ -299,6 +299,13 @@ jQuery(document).ready( function($) {
|
||||
|
||||
// Ajax Cat
|
||||
$('#new' + taxonomy).one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } );
|
||||
|
||||
$('#new' + taxonomy).keypress( function(event){
|
||||
if( 13 === event.keyCode ) {
|
||||
event.preventDefault();
|
||||
$('#' + taxonomy + '-add-submit').click();
|
||||
}
|
||||
});
|
||||
$('#' + taxonomy + '-add-submit').click( function(){ $('#new' + taxonomy).focus(); });
|
||||
|
||||
syncChecks = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user