Ticket #1659: 1659_2.patch

File 1659_2.patch, 1.2 KB (added by Alfonso Martínez de Lizarrondo, 16 years ago)

Revised patch

  • editor/_source/internals/fck_ie.js

     
    120120        evt.cancelBubble = true ;
    121121}
    122122
     123// Manually adjust the height of the body element because IE fails to do so
     124// if the document is in Strict CSS mode
     125function Doc_OnResize()
     126{
     127        var oBody = FCK.EditorDocument.body;
     128
     129        var iHeight = FCK.EditorDocument.documentElement.clientHeight
     130                - parseInt( oBody.currentStyle.paddingTop )
     131                - parseInt( oBody.currentStyle.paddingBottom )
     132                ;
     133
     134        // Use runtimeStyle so it doesn't get serialized later
     135        oBody.runtimeStyle.height = iHeight + 'px' ;
     136}
     137
    123138FCK.InitializeBehaviors = function( dontReturn )
    124139{
    125140        // Set the focus to the editable area when clicking in the document area.
     
    141156       
    142157        // Catch cursor selection changes.
    143158        this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ;
     159
     160        // #1659 The body in standards mode doesn't get full height.
     161        if ( FCKTools.IsStrictMode( FCK.EditorDocument ) )
     162        {
     163                this.EditorWindow.attachEvent( 'onresize', Doc_OnResize ) ;
     164                Doc_OnResize() ;
     165        }
    144166}
    145167
    146168FCK.InsertHtml = function( html )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy