Changeset 2158

Show
Ignore:
Timestamp:
2008-07-03 12:22:20 (21 months ago)
Author:
martinkou
Message:

Fixed #1917 : Fixed the issue where the merge down command for tables cells does not work in IE for more than two cells.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fcktablehandler.js

    r1565 r2158  
    678678FCKTableHandler._InstallTableMap = function( tableMap, table ) 
    679679{ 
     680        // Workaround for #1917 : MSIE will always report a cell's rowSpan as 1 as long 
     681        // as the cell is not attached to a row. So we'll need an alternative attribute 
     682        // for storing the calculated rowSpan in IE. 
     683        var rowSpanAttr = FCKBrowserInfo.IsIE ? "_fckrowspan" : "rowSpan" ; 
     684 
    680685        // Clear the table of all rows first. 
    681686        while ( table.rows.length > 0 ) 
     
    693698                        if ( cell.parentNode ) 
    694699                                cell.parentNode.removeChild( cell ) ; 
    695                         cell.colSpan = cell.rowSpan = 1 ; 
     700                        cell.colSpan = cell[rowSpanAttr] = 1 ; 
    696701                } 
    697702        } 
     
    728733                                continue ; 
    729734                        if ( tableMap[j-1] && tableMap[j-1][i] == cell ) 
    730                                 cell.rowSpan++ ; 
     735                                cell[rowSpanAttr]++ ; 
    731736                        if ( ! tableMap[j+1] || tableMap[j+1][i] != cell ) 
    732737                                cell._rowScanned = true ; 
     
    766771                        } 
    767772                        rowObj.appendChild( cell ) ; 
     773                        if ( rowSpanAttr != 'rowSpan' ) 
     774                        { 
     775                                cell.rowSpan = cell[rowSpanAttr] ; 
     776                                cell.removeAttribute( rowSpanAttr ) ; 
     777                        } 
    768778                        j += cell.colSpan ; 
    769779                        if ( cell.colSpan == 1 ) 
  • FCKeditor/trunk/_whatsnew.html

    r2157 r2158  
    6868                        where the fit window command loses the current selection and scroll position in the 
    6969                        editing area.</li> 
     70                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1917">#1917</a>] Fixed the issue 
     71                        where the merge down command for tables cells does not work in IE for more than two 
     72                        cells.</li> 
    7073        </ul> 
    7174        <p>