Ticket #2244: fckapi.patch

File fckapi.patch, 764 bytes (added by Scott McNaught, 16 years ago)
  • trunk/editor/_source/fckeditorapi.js

     
    2626
    2727function InitializeAPI()
    2828{
    29         var oParentWindow = window.parent ;
     29        // Find the top-most browser window
     30        var oParentWindow = window ;
     31       
     32        while( oParentWindow && oParentWindow.frameElement )
     33        {
     34                if( FCKBrowserInfo.IsIE )
     35                {
     36                        oParentWindow = oParentWindow.frameElement.parentNode.ownerDocument.parentWindow;
     37                }
     38                else
     39                {
     40                        oParentWindow = oParentWindow.frameElement.parentNode.ownerDocument.defaultView;
     41                }
     42        }
    3043
    3144        if ( !( FCKeditorAPI = oParentWindow.FCKeditorAPI ) )
    3245        {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy