diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
index 8ca1818bbf..76d4b1aac9 100644
--- a/wp-includes/comment-template.php
+++ b/wp-includes/comment-template.php
@@ -867,10 +867,10 @@ function comment_reply_link($args = array(), $comment = null, $post = null) {
return $link;
}
-function cancel_comment_reply_link($text = '', $respond_id = 'respond') {
+function cancel_comment_reply_link($text = '', $respond_id = 'respond', $respond_root = 'content') {
if ( empty($text) )
$text = __('Click here to cancel reply.');
- echo '' . $text . '';
+ echo '' . $text . '';
}
class Walker_Comment extends Walker {
diff --git a/wp-includes/js/comment-reply.js b/wp-includes/js/comment-reply.js
index 2ef8e73f2d..e234d9e356 100644
--- a/wp-includes/js/comment-reply.js
+++ b/wp-includes/js/comment-reply.js
@@ -19,13 +19,11 @@ function moveAddCommentForm(theId, threadId, respondId) {
document.getElementById("comment").focus();
}
-function cancelCommentReply() {
- var addComment = document.getElementById("respond");
+function cancelCommentReply(respondId, respondRoot) {
+ var addComment = document.getElementById(respondId);
var reRootElement = document.getElementById("cancel-comment-reply");
reRootElement.style.display = "none";
- var content = document.getElementById("content-main");
- if( !content )
- content = document.getElementById("content");
+ var content = document.getElementById(respondRoot);
if( content ) {
addComment.parentNode.removeChild(addComment);
content.appendChild(addComment);