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: http://core.svn.wordpress.org/trunk@21970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43d0bc1ed7
commit
469a77d74c
|
@ -299,6 +299,13 @@ jQuery(document).ready( function($) {
|
||||||
|
|
||||||
// Ajax Cat
|
// Ajax Cat
|
||||||
$('#new' + taxonomy).one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } );
|
$('#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(); });
|
$('#' + taxonomy + '-add-submit').click( function(){ $('#new' + taxonomy).focus(); });
|
||||||
|
|
||||||
syncChecks = function() {
|
syncChecks = function() {
|
||||||
|
|
Loading…
Reference in New Issue