Ticket #2311: 2311.patch

File 2311.patch, 1.3 KB (added by Martin Kou, 16 years ago)
  • editor/_source/internals/fckdialog.js

     
    9999                        // Calculate the dialog position, centering it on the screen.
    100100                        var viewSize = FCKTools.GetViewPaneSize( topWindow ) ;
    101101                        var scrollPosition = { 'X' : 0, 'Y' : 0 } ;
    102                         if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
    103                                 FCKTools.GetScrollPosition( topWindow ) ;
     102                        var useAbsolutePosition = FCKBrowserInfo.IsIE && ( !FCKBrowserInfo.IsIE7 || !FCKTools.IsStrictMode( topWindow.document ) ) ;
     103                        if ( useAbsolutePosition )
     104                                scrollPosition = FCKTools.GetScrollPosition( topWindow ) ;
    104105                        var iTop  = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ;
    105106                        var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 )  / 2, 0 ) ;
    106107
     
    116117                        dialog.allowTransparency = true ;
    117118                        FCKDomTools.SetElementStyles( dialog,
    118119                                        {
    119                                                 'position'      : ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) ? 'absolute' : 'fixed',
     120                                                'position'      : ( useAbsolutePosition ) ? 'absolute' : 'fixed',
    120121                                                'top'           : iTop + 'px',
    121122                                                'left'          : iLeft + 'px',
    122123                                                'width'         : width + 'px',
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy