mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Comments: When setting the colspan
value for inline edit/reply, make sure it's actually a table and the value is not empty.
Props afercia. Fixes #33596. Built from https://develop.svn.wordpress.org/trunk@34179 git-svn-id: http://core.svn.wordpress.org/trunk@34147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a5a8ae45a6
commit
80165bfc4a
@ -623,7 +623,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;
|
||||
@ -633,8 +634,12 @@ commentReply = {
|
||||
action = action || 'replyto';
|
||||
act = 'edit' == action ? 'edit' : 'replyto';
|
||||
act = t.act = act + '-comment';
|
||||
colspanVal = $( 'th:visible, td:visible', c ).length;
|
||||
|
||||
$( 'td', editRow ).attr( 'colspan', $( '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);
|
||||
|
2
wp-admin/js/edit-comments.min.js
vendored
2
wp-admin/js/edit-comments.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34178';
|
||||
$wp_version = '4.4-alpha-34179';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user