From 02b335675029bb0d36608032d960224a57647de0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 24 Jan 2015 15:06:43 +0000 Subject: [PATCH] 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 --- src/wp-admin/js/inline-edit-post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/js/inline-edit-post.js b/src/wp-admin/js/inline-edit-post.js index de12499754..9f1b13b044 100644 --- a/src/wp-admin/js/inline-edit-post.js +++ b/src/wp-admin/js/inline-edit-post.js @@ -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); } });