Changeset 2206 for FCKeditor/branches

Show
Ignore:
Timestamp:
2008-07-11 12:08:10 (5 months ago)
Author:
martinkou
Message:

Fixed infinite loop with DIV container detection in IE.
Fixed the problem where StartNode may be located after EndNode in an FCKDomRange in IE.
Fixed invalid inline CSS text display in DIV container dialog in IE.

Location:
FCKeditor/branches/features/div_container/editor
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/features/div_container/editor/dialog/fck_div.html

    r2199 r2206  
    138138                        GetE( 'txtId' ).value = target.id ; 
    139139                        GetE( 'txtLang' ).value = target.lang ; 
    140                         GetE( 'txtInlineStyle').value = target.getAttribute( 'style' ) ; 
     140                        GetE( 'txtInlineStyle').value = target.style.cssText ; 
    141141                        GetE( 'txtTitle' ).value = target.title ; 
    142142                        GetE( 'selLangDir').value = target.dir || GetNearestAncestorDirection( target ) ; 
  • FCKeditor/branches/features/div_container/editor/_source/classes/fckdomrange.js

    r2122 r2206  
    6767                        } 
    6868                        else if ( eEndNode.nodeType == 1 ) 
    69                                 eEndNode = eEndNode.childNodes[ innerRange.endOffset - 1 ] ; 
     69                        { 
     70                                if ( innerRange.endContainer != innerRange.startContainer || innerRange.endOffset != innerRange.startOffset ) 
     71                                        eEndNode = eEndNode.childNodes[ innerRange.endOffset - 1 ] ; 
     72                                else 
     73                                        eEndNode = eEndNode.childNodes[ innerRange.endOffset ] ; 
     74                        } 
    7075 
    7176                        this.EndNode                    = eEndNode ; 
  • FCKeditor/branches/features/div_container/editor/_source/internals/fckdomtools.js

    r2205 r2206  
    10321032                var endNode = range.EndNode ; 
    10331033                var currentNode = startNode ; 
    1034                  
     1034 
    10351035                if ( startNode == endNode ) 
    10361036                { 
    1037                         while ( endNode.lastChild ) 
     1037                        while ( endNode.nodeType == 1 && endNode.lastChild ) 
    10381038                                endNode = endNode.lastChild ; 
    10391039                        endNode = FCKDomTools.GetNextSourceElement( endNode ) ; 
    10401040                } 
    10411041 
    1042                 while ( currentNode != endNode && currentNode != endNode.parentNode ) 
     1042                while ( currentNode && currentNode != endNode && currentNode != endNode.parentNode ) 
    10431043                { 
    10441044                        var path = new FCKElementPath( currentNode ) ; 
    10451045                        var blockLimit = path.BlockLimit ; 
    1046                         if ( blockLimit && blockLimit.nodeName.IEquals( 'div' ) && currentBlocks.indexOf( blockLimit ) == -1 ) 
     1046                        if ( blockLimit && blockLimit.nodeName.IEquals( 'div' ) && currentBlocks.IndexOf( blockLimit ) == -1 ) 
    10471047                                currentBlocks.push( blockLimit ) ; 
    10481048