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