Make WordPress Core

Ticket #33596: 33596.4.patch

File 33596.4.patch, 1013 bytes (added by afercia, 10 years ago)
  • src/wp-admin/js/edit-comments.js

     
    623623                var editRow, rowData, act, replyButton, editHeight,
    624624                        t = this,
    625625                        c = $('#comment-' + comment_id),
    626                         h = c.height();
     626                        h = c.height(),
     627                        colspanVal = 0;
    627628
    628629                t.close();
    629630                t.cid = comment_id;
     
    633634                action = action || 'replyto';
    634635                act = 'edit' == action ? 'edit' : 'replyto';
    635636                act = t.act = act + '-comment';
     637                colspanVal = $( 'th:visible, td:visible', c ).length;
    636638
    637                 $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', c ).length );
     639                // Be sure it's actually a table and there's a `colspan` value to apply.
     640                if ( editRow.hasClass( 'inline-edit-row' ) && 0 !== colspanVal ) {
     641                        $( 'td', editRow ).attr( 'colspan', colspanVal );
     642                }
    638643
    639644                $('#action', editRow).val(act);
    640645                $('#comment_post_ID', editRow).val(post_id);