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:
Konstantin Obenland 2015-07-01 14:54:24 +00:00
parent 423a1a7ca4
commit d03ff4b3d9
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */ /* 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; var commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink;
// Back-compat: prevent fatal errors // Back-compat: prevent fatal errors
@ -266,6 +266,10 @@ jQuery(document).ready( function($) {
wp.autosave.server.suspend(); 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; releaseLock = false;
$(window).off( 'beforeunload.edit-post' ); $(window).off( 'beforeunload.edit-post' );

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-alpha-33023'; $wp_version = '4.3-alpha-33024';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.