Ticket #2472 (closed Bug: fixed)

Opened 4 months ago

Last modified 3 months ago

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

2472.patch (6.4 KB) - added by alfonsoml 4 months ago.
Proposed patch

Change History

Changed 4 months ago by alfonsoml

Proposed patch

Changed 4 months 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.

Changed 3 months ago by martinkou

  • keywords Review+ added; Review? removed

Changed 3 months ago by alfonsoml

  • status changed from assigned to closed
  • resolution set to fixed
  • milestone set to FCKeditor 2.6.4

Fixed with [2373]

Note: See TracTickets for help on using tickets.