Quick Edit: Don't save the post if Enter is pressed on the Cancel link.

props afercia.
fixes #30345.

git-svn-id: https://develop.svn.wordpress.org/trunk@31274 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-01-24 15:06:43 +00:00
parent 1b05ffa982
commit 02b3356750
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ inlineEditPost = {
return inlineEditPost.save(this);
});
$('td', qeRow).keydown(function(e){
if ( e.which === 13 ) {
if ( e.which === 13 && ! $( e.target ).hasClass( 'cancel' ) ) {
return inlineEditPost.save(this);
}
});