diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php
index 3beafb821d..4238d8f327 100644
--- a/src/wp-admin/includes/class-wp-comments-list-table.php
+++ b/src/wp-admin/includes/class-wp-comments-list-table.php
@@ -474,11 +474,11 @@ class WP_Comments_List_Table extends WP_List_Table {
if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
$actions['edit'] = "". __( 'Edit' ) . '';
- $format = '%s';
+ $format = '%s';
- $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $post->ID, 'vim-q edit-comment-inline', esc_attr__( 'Quick Edit' ), __( 'Quick Edit' ) );
+ $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $post->ID, 'edit', 'vim-q comment-inline', esc_attr__( 'Quick Edit' ), __( 'Quick Edit' ) );
- $actions['reply'] = sprintf( $format, $comment->comment_ID, $post->ID, 'vim-r reply-comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) );
+ $actions['reply'] = sprintf( $format, $comment->comment_ID, $post->ID, 'replyto', 'vim-r comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) );
}
/** This filter is documented in wp-admin/includes/dashboard.php */
diff --git a/src/wp-admin/js/edit-comments.js b/src/wp-admin/js/edit-comments.js
index d8a402ecd6..78c46174ea 100644
--- a/src/wp-admin/js/edit-comments.js
+++ b/src/wp-admin/js/edit-comments.js
@@ -608,24 +608,18 @@ $(document).ready(function(){
);
}
- if ( typeof commentReply != 'undefined' ) {
+ // Quick Edit and Reply have an inline comment editor.
+ $( '#the-comment-list' ).on( 'click', '.comment-inline', function (e) {
+ e.preventDefault();
+ var $el = $( this ),
+ action = 'replyto';
- // Each "Quick Edit" link, open the comment editor
- $( 'body' ).on( 'click', '.comment .row-actions .quickedit .edit-comment-inline', function (e) {
- e.preventDefault();
+ if ( 'undefined' !== typeof $el.data( 'action' ) ) {
+ action = $el.data( 'action' );
+ }
- var $el = $( e.currentTarget );
- commentReply.open( $el.data( 'comment-id' ), $el.data( 'post-id' ), 'edit' );
- } );
-
- // Each "Reply" link, open the comment reply
- $( 'body' ).on( 'click', '.comment .row-actions .reply .reply-comment-inline', function (e) {
- e.preventDefault();
-
- var $el = $( e.currentTarget );
- commentReply.open( $el.data('comment-id'), $el.data('post-id') );
- } );
- }
+ commentReply.open( $el.data( 'commentId' ), $el.data( 'postId' ), action );
+ } );
});
})(jQuery);