Ticket #2486: 2486.patch
File 2486.patch, 2.2 KB (added by , 16 years ago) |
---|
-
_whatsnew.html
62 62 now are shown properly.</li> 63 63 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2496">#2496</a>] Using the Paste 64 64 dialogs in IE might insert the content at the start of the editor.</li> 65 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2486">#2486</a>] Vertically splitting 66 cell with colspan > 1 breaks table layout.</li> 65 67 </ul> 66 68 <p> 67 69 <a href="_whatsnew_history.html">See previous versions history</a></p> -
editor/_source/internals/fcktablehandler.js
518 518 var currentRowIndex = currentCell.parentNode.rowIndex ; 519 519 var cellIndex = FCKTableHandler._GetCellIndexSpan( tableMap, currentRowIndex, currentCell ) ; 520 520 var currentRowSpan = currentCell.rowSpan ; 521 // Save current cell colSpan 522 var currentColSpan = isNaN( currentCell.colSpan ) ? 1 : currentCell.colSpan ; 521 523 if ( isNaN( currentRowSpan ) ) 522 524 currentRowSpan = 1 ; 523 525 … … 539 541 } 540 542 } 541 543 542 // 3. Insert the new cell to the indicated place, with the appropriate rowSpan , next row.544 // 3. Insert the new cell to the indicated place, with the appropriate rowSpan and colSpan, next row. 543 545 var newCell = FCK.EditorDocument.createElement( currentCell.nodeName ) ; 544 546 newCell.rowSpan = Math.floor( currentRowSpan / 2 ) ; 547 newCell.colSpan = currentColSpan ; 545 548 if ( FCKBrowserInfo.IsGeckoLike ) 546 549 FCKTools.AppendBogusBr( newCell ) ; 547 550 currentCell.parentNode.parentNode.rows[newCellRowIndex].insertBefore( newCell, insertMarker ) ; … … 575 578 i += colSpan ; 576 579 } 577 580 578 // 3. Insert a new cell to new row. 581 // 3. Insert a new cell to new row. Set colSpan on the new cell. 579 582 var newCell = FCK.EditorDocument.createElement( currentCell.nodeName ) ; 583 newCell.colSpan = currentColSpan ; 580 584 if ( FCKBrowserInfo.IsGeckoLike ) 581 585 FCKTools.AppendBogusBr( newCell ) ; 582 586 newRow.appendChild( newCell ) ;