Changeset 1092


Ignore:
Timestamp:
11/20/2007 06:15:26 AM (7 years ago)
Author:
martinkou
Message:

Fixed #1538 : Fixed the issue where the fit window command is broken after [1091].

File:
1 edited

Legend:

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

    r1091 r1092  
    458458                } 
    459459        } 
    460         x += w.document.body.offsetLeft ; 
    461         y += w.document.body.offsetTop ; 
     460 
     461        // document.body is a special case when it comes to offsetTop and offsetLeft values. 
     462        // We can't just blindly sum it up in the while loop above. 
     463        if ( FCKDomTools.GetCurrentElementStyle( w, w.document.body, 'position') != 'static' ) 
     464        { 
     465                x += w.document.body.offsetLeft ; 
     466                y += w.document.body.offsetTop ; 
     467        } 
    462468        return { "x" : x, "y" : y } ; 
    463469} 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy