Ticket #2486: 2486_1.patch
File 2486_1.patch, 2.3 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
517 517 var tableMap = this._CreateTableMap( currentCell ) ; 518 518 var currentRowIndex = currentCell.parentNode.rowIndex ; 519 519 var cellIndex = FCKTableHandler._GetCellIndexSpan( tableMap, currentRowIndex, currentCell ) ; 520 // Save current cell colSpan 521 var currentColSpan = isNaN( currentCell.colSpan ) ? 1 : currentCell.colSpan ; 520 522 var currentRowSpan = currentCell.rowSpan ; 521 523 if ( isNaN( currentRowSpan ) ) 522 524 currentRowSpan = 1 ; … … 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 if ( currentColSpan > 1 ) 548 newCell.colSpan = currentColSpan ; 545 549 if ( FCKBrowserInfo.IsGeckoLike ) 546 550 FCKTools.AppendBogusBr( newCell ) ; 547 551 currentCell.parentNode.parentNode.rows[newCellRowIndex].insertBefore( newCell, insertMarker ) ; … … 575 579 i += colSpan ; 576 580 } 577 581 578 // 3. Insert a new cell to new row. 582 // 3. Insert a new cell to new row. Set colSpan on the new cell. 579 583 var newCell = FCK.EditorDocument.createElement( currentCell.nodeName ) ; 584 if ( currentColSpan > 1 ) 585 newCell.colSpan = currentColSpan ; 580 586 if ( FCKBrowserInfo.IsGeckoLike ) 581 587 FCKTools.AppendBogusBr( newCell ) ; 582 588 newRow.appendChild( newCell ) ;