]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/edit-comments.js
WordPress 4.3.1
[autoinstalls/wordpress.git] / wp-admin / js / edit-comments.js
index bea253cec060016796b82637ec0d07d5ae6ff736..b3e69bf7fd56e693b016e56330fde3b3a52107a7 100644 (file)
@@ -362,7 +362,8 @@ commentReply = {
                var editRow, rowData, act, replyButton, editHeight,
                        t = this,
                        c = $('#comment-' + comment_id),
-                       h = c.height();
+                       h = c.height(),
+                       colspanVal = 0;
 
                t.close();
                t.cid = comment_id;
@@ -372,6 +373,12 @@ commentReply = {
                action = action || 'replyto';
                act = 'edit' == action ? 'edit' : 'replyto';
                act = t.act = act + '-comment';
+               colspanVal = $( 'th:visible, td:visible', c ).length;
+
+               // Make sure it's actually a table and there's a `colspan` value to apply.
+               if ( editRow.hasClass( 'inline-edit-row' ) && 0 !== colspanVal ) {
+                       $( 'td', editRow ).attr( 'colspan', colspanVal );
+               }
 
                $('#action', editRow).val(act);
                $('#comment_post_ID', editRow).val(post_id);