Ticket #2320: 2320.patch

File 2320.patch, 2.4 KB (added by Martin Kou, 16 years ago)
  • _whatsnew.html

     
    6464                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2322">#2322</a>] Fixed the issue
    6565                        where the fit window command loses the current selection and scroll position in the
    6666                        editing area.</li>
     67                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2320">#2320</a>] Fixed the issue
     68                        where the Find/Replace dialog scrolls the entire page.</li>
    6769        </ul>
    6870        <p>
    6971                <a href="_whatsnew_history.html">See previous versions history</a></p>
  • editor/_source/internals/fckdomtools.js

     
    989989                // Appends the height it we are about to align the bottoms.
    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                        var margin = parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) ;
     998                        if ( !isNaN( margin ) )
     999                                offset += margin ;
    9981000                }
    9991001
    10001002                // Appends the offsets for the entire element hierarchy.
    1001                 offset += element.offsetTop ;
    1002                 while ( ( element = element.offsetParent ) )
    1003                         offset += element.offsetTop || 0 ;
     1003                var elementPosition = FCKTools.GetDocumentPosition( window, element ) ;
     1004                offset += elementPosition.y ;
    10041005
    10051006                // Scroll the window to the desired position, if not already visible.
    10061007                var currentScroll = FCKTools.GetScrollPosition( window ).Y ;
  • editor/dialog/fck_replace.html

     
    185185                var focusNode = domRange.StartNode ;
    186186                if ( focusNode.nodeType != 1 )
    187187                        focusNode = focusNode.parentNode ;
    188                 focusNode.scrollIntoView( false ) ;
     188                FCKDomTools.ScrollIntoView( focusNode, false ) ;
    189189                this._cursors = charRange._cursors ;
    190190        },
    191191
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy