From 238d5a78a60ccf1544762349b89d846e4503592b Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Wed, 1 Jul 2015 14:53:48 +0000 Subject: [PATCH] Close comment quick edit before updating a post. Fixes a bug where the user gets redirected to the All Posts screen, after updating a post while quick editing a comment. Props polevaultweb. Fixes #29457. git-svn-id: https://develop.svn.wordpress.org/trunk@33024 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/post.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/js/post.js b/src/wp-admin/js/post.js index d265b520f7..c9cc8695eb 100644 --- a/src/wp-admin/js/post.js +++ b/src/wp-admin/js/post.js @@ -1,5 +1,5 @@ /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */ -/* global theList:true, theExtraList:true, getUserSetting, setUserSetting */ +/* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply */ var commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink; // Back-compat: prevent fatal errors @@ -266,6 +266,10 @@ jQuery(document).ready( function($) { wp.autosave.server.suspend(); } + // Close the comment edit/reply form if open to stop the form + // action from interfering with the post's form action. + commentReply.close(); + releaseLock = false; $(window).off( 'beforeunload.edit-post' );