Opened 9 years ago

Closed 9 years ago

#2472 closed Bug (fixed)

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

Reported by: shri Owned by: Alfonso Martínez de Lizarrondo
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 Alfonso Martínez de Lizarrondo 9 years ago.
Proposed patch

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by Alfonso Martínez de Lizarrondo

Attachment: 2472.patch added

Proposed patch

comment:1 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review? added
Owner: set to Alfonso Martínez de Lizarrondo
Status: newassigned

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 9 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:3 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Milestone: FCKeditor 2.6.4
Resolution: fixed
Status: assignedclosed

Fixed with [2373]

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