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. Built from https://develop.svn.wordpress.org/trunk@33024 git-svn-id: http://core.svn.wordpress.org/trunk@32995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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' );
|
||||
|
||||
|
||||
2
wp-admin/js/post.min.js
vendored
2
wp-admin/js/post.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user