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
This commit is contained in:
Konstantin Obenland 2015-07-01 14:53:48 +00:00
parent cc23659078
commit 238d5a78a6
1 changed files with 5 additions and 1 deletions

View File

@ -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' );