Ticket #6146: 6146.patch

File 6146.patch, 3.2 KB (added by Sa'ar Zac Elias, 14 years ago)
  • _source/core/dom/element.js

     
    12191219                        return null;
    12201220                },
    12211221
    1222                 getDocumentPosition : function( refDocument )
     1222                getDocumentPosition : function( refDocument, ignoreXScrolling )
    12231223                {
    12241224                        var x = 0, y = 0,
    1225                                 body = this.getDocument().getBody(),
    1226                                 quirks = this.getDocument().$.compatMode == 'BackCompat';
     1225                                doc = this.getDocument(),
     1226                                body = doc.getBody(),
     1227                                quirks = doc.$.compatMode == 'BackCompat';
    12271228
    1228                         var doc = this.getDocument();
    12291229
    12301230                        if ( document.documentElement[ "getBoundingClientRect" ] )
    12311231                        {
     
    12571257
    12581258                                if ( needAdjustScrollAndBorders )
    12591259                                {
    1260                                         x = box.left + ( !quirks && $docElem.scrollLeft || body.$.scrollLeft );
     1260                                        x = box.left;
     1261                                        // The scrolling addition might cause problems (#6146).
     1262                                        if ( !CKEDITOR.env.ie || ( ignoreXScrolling && CKEDITOR.env.ie ) )
     1263                                                x += ( !quirks && $docElem.scrollLeft || body.$.scrollLeft );
    12611264                                        x -= clientLeft;
    12621265                                        y = box.top  + ( !quirks && $docElem.scrollTop || body.$.scrollTop );
    12631266                                        y -= clientTop;
  • _source/plugins/floatpanel/plugin.js

     
    1616        function getPanel( editor, doc, parentElement, definition, level )
    1717        {
    1818                // Generates the panel key: docId-eleId-skinName-langDir[-uiColor][-CSSs][-level]
    19                 var key =
    20                         doc.getUniqueId() +
    21                         '-' + parentElement.getUniqueId() +
    22                         '-' + editor.skinName +
    23                         '-' + editor.lang.dir +
    24                         ( ( editor.uiColor && ( '-' + editor.uiColor ) ) || '' ) +
    25                         ( ( definition.css && ( '-' + definition.css ) ) || '' ) +
    26                         ( ( level && ( '-' + level ) ) || '' );
     19                var key = CKEDITOR.tools.genKey( doc.getUniqueId(), parentElement.getUniqueId(), editor.skinName,
     20                                                editor.lang.dir, editor.uiColor || '', definition.css || '', level || '' );
    2721
    2822                var panel = panels[ key ];
    2923
     
    9892                                        3 = bottom-left
    9993                                        4 = bottom-right
    10094                         */
    101                         showBlock : function( name, offsetParent, corner, offsetX, offsetY )
     95                        showBlock : function( name, offsetParent, corner, offsetX, offsetY, ignoreXScrolling )
    10296                        {
    10397                                var panel = this._.panel,
    10498                                        block = panel.showBlock( name );
     
    109103                                var element = this.element,
    110104                                        iframe = this._.iframe,
    111105                                        definition = this._.definition,
    112                                         position = offsetParent.getDocumentPosition( element.getDocument() ),
     106                                        position = offsetParent.getDocumentPosition( element.getDocument(), ignoreXScrolling ),
    113107                                        rtl = this._.dir == 'rtl';
    114108
    115109                                var left        = position.x + ( offsetX || 0 ),
  • _source/plugins/panelbutton/plugin.js

     
    3636                        return;
    3737                }
    3838
    39                 _.panel.showBlock( this._.id, this.document.getById( this._.id ), 4 );
     39                _.panel.showBlock( this._.id, this.document.getById( this._.id ), 4, 0, 0, 1 );
    4040        };
    4141
    4242
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy