Opened 8 years ago

Closed 8 years ago

#2472 closed Bug (fixed)

Splitting <th> produces a <td> instead of a second <th>

Reported by: shri046 Owned by: alfonsoml
Priority: Normal Milestone: FCKeditor 2.6.4
Component: General Version: FCKeditor 2.6.3
Keywords: Review+ Cc:

Description

Insert the following table into the editor on the demo page

<table width="200" cellspacing="1" cellpadding="1" border="1">
    <thead>
        <tr>
            <th scope="col" colspan="2">&nbsp;&nbsp;&nbsp;</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>

Splitting the header cell horizontally produces a <td> within the <thead> as opposed to <th> as shown below

<table width="200" cellspacing="1" cellpadding="1" border="1">
    <thead>
        <tr>
            <th scope="col">&nbsp;&nbsp;&nbsp;</th>
            <td>&nbsp;</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>

Attachments (1)

2472.patch (6.4 KB) - added by alfonsoml 8 years ago.
Proposed patch

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by alfonsoml

Proposed patch

comment:1 Changed 8 years ago by alfonsoml

  • Keywords Review? added
  • Owner set to alfonsoml
  • Status changed from new to assigned

I've attached a patch that fixes the problem.

It's just replacing the createElement( 'td' ) with createElement( currentCell.nodeName ) in the splitting functions, but I've included other minor changes to simplify some other code (so fixing later #1865 might be a little easier) or fix a typo.

comment:2 Changed 8 years ago by martinkou

  • Keywords Review+ added; Review? removed

comment:3 Changed 8 years ago by alfonsoml

  • Milestone set to FCKeditor 2.6.4
  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [2373]

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy