Ticket #2487 (new Bug)

Opened 4 months ago

Last modified 2 months ago

Split non-header cell in table with <thead> throws JavaScript error

Reported by: shri046 Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.4
Keywords: Confirmed Cc:

Description

Tested below steps on trunk samples default page in FF and IE

1. Create a 3x2 table with first row header. 2. Split non-header cell horizontally and JS error is thrown. 3. Also splitting non-header cell vertically breaks the table layout.

Change History

Changed 2 months ago by arczi

  • keywords Confirmed added
  • version changed from SVN to FCKeditor 2.4

1. Insert source:

<table cellspacing="1" cellpadding="1" border="1" width="200">
    <thead>
        <tr>
            <td>11</td>
            <td>22</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>33&nbsp;</td>
            <td>44&nbsp;</td>
        </tr>
        <tr>
            <td>55&nbsp;</td>
            <td>66&nbsp;</td>
        </tr>
    </tbody>
</table>
<p>&nbsp;</p>

2. In WYSIWYG. right-click 33 > Cell > Split cell horizontally

You've got an error:

cell is undefined
http://localhost/edytor/FCKeditor/tags/2.6.3/editor/_source/internals/fcktablehandler.js
Line 702
701 var cell = tableMap[i][j] ;
702 if ( cell.parentNode )
703 cell.parentNode.removeChild( cell ) ;
704 cell.colSpan = cell[rowSpanAttr] = 1 ;

Changed 2 months ago by fredck

May be related to #1865

Note: See TracTickets for help on using tickets.