Ticket #2777: 2777.patch

File 2777.patch, 1.1 KB (added by Koen Willems, 15 years ago)
  • fcktablehandler.js

     
    288288        if ( cells.length < 1 )
    289289                return false ;
    290290
     291        // Check if the selected cells are all in the same table section (thead, tfoot or tbody)
     292        for (var i = 0; i < cells.length; i++)
     293        {
     294                if ( cells[i].parentNode.parentNode != cells[0].parentNode.parentNode )
     295                        return false ;
     296        }
     297
    291298        this._MarkCells( cells, '_CellSelected' ) ;
    292299
    293300        var tableMap = this._CreateTableMap( cells[0] ) ;
     
    839846        if ( ! nextCell )
    840847                return null ;
    841848
     849        // Check if the selected cells are both in the same table section (thead, tfoot or tbody).
     850        if ( refCell.parentNode.parentNode != nextCell.parentNode.parentNode )
     851                return null ;
     852
    842853        // The two cells must have the same horizontal geometry, otherwise merging does not makes sense.
    843854        this._MarkCells( [refCell, nextCell], '_SizeTest' ) ;
    844855        var refGeometry = this._GetMarkerGeometry( tableMap, rowIdx, colIdx, '_SizeTest' ) ;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy