Changeset 2159

Show
Ignore:
Timestamp:
2008-07-03 12:25:47 (6 months ago)
Author:
martinkou
Message:

Fixed #2320 : Fixed the issue where the Find/Replace dialog scrolls the entire page.

Location:
FCKeditor/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/dialog/fck_replace.html

    r2060 r2159  
    186186                if ( focusNode.nodeType != 1 ) 
    187187                        focusNode = focusNode.parentNode ; 
    188                 focusNode.scrollIntoView( false ) ; 
     188                FCKDomTools.ScrollIntoView( focusNode, false ) ; 
    189189                this._cursors = charRange._cursors ; 
    190190        }, 
  • FCKeditor/trunk/editor/_source/internals/fckdomtools.js

    r2144 r2159  
    990990                if ( alignTop === false ) 
    991991                { 
    992                         offset += element.offsetHeight ; 
     992                        offset += element.offsetHeight || 0 ; 
    993993 
    994994                        // Consider the margin in the scroll, which is ok for our current 
    995995                        // needs, but needs investigation if we will be using this function 
    996996                        // in other places. 
    997                         offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) ; 
     997                        offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) || 0 ; 
    998998                } 
    999999 
    10001000                // Appends the offsets for the entire element hierarchy. 
    1001                 offset += element.offsetTop ; 
    1002                 while ( ( element = element.offsetParent ) ) 
    1003                         offset += element.offsetTop || 0 ; 
     1001                var elementPosition = FCKTools.GetDocumentPosition( window, element ) ; 
     1002                offset += elementPosition.y ; 
    10041003 
    10051004                // Scroll the window to the desired position, if not already visible. 
  • FCKeditor/trunk/_whatsnew.html

    r2158 r2159  
    7171                        where the merge down command for tables cells does not work in IE for more than two 
    7272                        cells.</li> 
     73                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2320">#2320</a>] Fixed the issue 
     74                        where the Find/Replace dialog scrolls the entire page.</li> 
    7375        </ul> 
    7476        <p>