Ticket #3414: 3414.patch

File 3414.patch, 1.2 KB (added by Martin Kou, 11 years ago)
  • _source/core/dom/element.js

     
    11311131
    11321132                        // document.body is a special case when it comes to offsetTop and offsetLeft
    11331133                        // values.
    1134                         // 1. It matters if document.body itself is a positioned element;
    1135                         // 2. It matters when we're in IE and the element has no positioned ancestor.
     1134                        // 1. It does not matter if we're in IE Quirks mode - in this case body is
     1135                        //      equal to the view pane itself.
     1136                        // 2. It matters if document.body itself is a positioned element;
     1137                        // 3. It matters when we're in IE Standards mode and the element has no
     1138                        //      positioned ancestor.
    11361139                        // Otherwise the values should be ignored.
    1137                         if ( body.getComputedStyle( 'position' ) != 'static' || ( CKEDITOR.env.ie && !this.getPositionedAncestor() ) )
     1140                        var ie = CKEDITOR.env.ie;
     1141                        var quirks = CKEDITOR.env.quirks;
     1142                        if ( !( ie && quirks ) && ( body.getComputedStyle( 'position' ) != 'static' || ( ie && !this.getPositionedAncestor() ) ) )
    11381143                        {
    11391144                                x += body.$.offsetLeft + ( body.$.clientLeft || 0 );
    11401145                                y += body.$.offsetTop + ( body.$.clientTop || 0 );
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy