Ticket #1659: 1659_1.patch

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

Proposed SVN 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        // The problem only exists in Strict mode
     128        if ( !FCKTools.IsStrictMode(FCK.EditorDocument) )
     129                return ;
     130
     131        var oBody = FCK.EditorDocument.body;
     132
     133        var iHeight = FCK.EditorDocument.documentElement.clientHeight
     134                - parseInt( oBody.currentStyle.paddingTop )
     135                - parseInt( oBody.currentStyle.paddingBottom )
     136                ;
     137
     138        // Use runtimeStyle so it doesn't get serialized later
     139        oBody.runtimeStyle.height = iHeight + 'px' ;
     140}
     141
    123142FCK.InitializeBehaviors = function( dontReturn )
    124143{
    125144        // Set the focus to the editable area when clicking in the document area.
     
    141160       
    142161        // Catch cursor selection changes.
    143162        this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ;
     163
     164        // #1659 the body in standards mode doesn't get full height.
     165        this.EditorWindow.attachEvent( 'onresize', Doc_OnResize ) ;
     166        Doc_OnResize() ;
    144167}
    145168
    146169FCK.InsertHtml = function( html )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy