Ticket #1642: 1642.patch

File 1642.patch, 2.6 KB (added by Alfonso Martínez de Lizarrondo, 13 years ago)

Proposed SVN patch

  • _source/internals/fck_gecko.js

     
    2828FCK.InitializeBehaviors = function()
    2929{
    3030        // When calling "SetData", the editing area IFRAME gets a fixed height. So we must recalculate it.
    31         if ( FCKBrowserInfo.IsGecko )           // Not for Safari/Opera.
    32                 Window_OnResize() ;
     31        if ( window.onresize )          // Not for Safari/Opera.
     32                window.onresize() ;
    3333
    3434        FCKFocusManager.AddWindow( this.EditorWindow ) ;
    3535
  • fckdialog.html

     
    179179                oDiv.className = 'PopupTabSelected' ;
    180180                eTabsRow.style.display = '' ;
    181181
    182                 if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
     182                if ( window.onresize )
    183183                        window.onresize() ;
    184184        }
    185185
     
    256256}
    257257DisableContextMenu( document ) ;
    258258
    259 if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
     259if ( window.dialogArguments.Editor.FCKBrowserInfo.IsGecko && !window.dialogArguments.Editor.FCKBrowserInfo.IsOpera )
    260260{
    261         window.onresize = function()
     261        window.onresize = function( e )
    262262        {
     263                // Running in Chrome makes the window receive the event including subframes.
     264                // we care only about this window. Ticket #1642
     265                if ( e && e.originalTarget !== document )
     266                                return ;
     267
    263268                var oFrame = document.getElementById("frmMain") ;
    264269
    265270                if ( ! oFrame )
    266                 return ;
     271                        return ;
    267272
    268273                oFrame.height = 0 ;
    269274
  • fckeditor.html

     
    281281        }
    282282}
    283283
    284 // Gecko browsers doens't calculate well that IFRAME size so we must
     284// Gecko browsers doesn't calculate well the IFRAME size so we must
    285285// recalculate it every time the window size changes.
    286 if ( FCKBrowserInfo.IsGecko )
     286if ( FCKBrowserInfo.IsGecko && !FCKBrowserInfo.IsOpera )
    287287{
    288         function Window_OnResize()
     288        window.onresize = function( e )
    289289        {
    290                 if ( FCKBrowserInfo.IsOpera )
     290                // Running in Chrome makes the window receive the event including subframes.
     291                // we care only about this window. Ticket #1642
     292                if ( e && e.originalTarget !== document )
    291293                        return ;
    292294
    293295                var oCell = document.getElementById( 'xEditingArea' ) ;
     
    299301                        eInnerElement.style.height = oCell.scrollHeight - 2 ;
    300302                }
    301303        }
    302         window.onresize = Window_OnResize ;
    303304}
    304305
    305306        </script>
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy