Ticket #2394: 2394.patch

File 2394.patch, 1.7 KB (added by Martin Kou, 13 years ago)
  • _whatsnew.html

     
    104104                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2368">#2368</a>] Fixed broken protect
    105105                        source logic for comments in IE.</li>
    106106                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2387">#2387</a>] Fixed JavaScript
    107                         with list commands when the editable document is selected with Ctrl-A.</li>
     107                        error with list commands when the editable document is selected with Ctrl-A.</li>
     108                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2394">#2394</a>] Fixed JavaScript
     109                        error with the "split vertically" command in IE when attempting to split cells in the last
     110                        row of a table.</li>
    108111        </ul>
    109112        <p>
    110113                <a href="_whatsnew_history.html">See previous versions history</a></p>
  • editor/_source/internals/fcktablehandler.js

     
    550550                // 1. Insert a new row.
    551551                var newCellRowIndex = currentRowIndex + 1 ;
    552552                var newRow = FCK.EditorDocument.createElement( 'tr' ) ;
    553                 currentCell.parentNode.parentNode.insertBefore( newRow, currentCell.parentNode.parentNode.rows[newCellRowIndex] ) ;
     553                var tBody = currentCell.parentNode.parentNode ;
     554                if ( tBody.rows.length > newCellRowIndex )
     555                        tBody.insertBefore( newRow, tBody.rows[newCellRowIndex] ) ;
     556                else
     557                        tBody.appendChild( newRow ) ;
    554558
    555559                // 2. +1 to rowSpan for all cells crossing currentCell's row.
    556560                for ( var i = 0 ; i < tableMap[currentRowIndex].length ; )
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy