Ticket #1728: 1728_2.patch

File 1728_2.patch, 2.4 KB (added by Martin Kou, 16 years ago)
  • _whatsnew.html

     
    7171                        is now enforced only when ForcePasteAsPlainText = true.</li>
    7272                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1336">#1336</a>] Sometimes
    7373                        the autogrow plugin didn't work properly in Firefox.</li>
     74                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1728">#1728</a>] External toolbars
     75                        are now properly sized in Opera.</li>
    7476        </ul>
    7577        <p>
    7678                <a href="_whatsnew_history.html">See previous versions history</a>
  • editor/_source/internals/fcktoolbarset.js

     
    9090
    9191                        // Initialize the IFRAME document body.
    9292                        eTargetDocument.open() ;
    93                         eTargetDocument.write( '<html><head>' + sBase + '<script type="text/javascript"> var adjust = function() { window.frameElement.height = document.body.scrollHeight ; }; window.onresize = adjust; window.onload = function () {window.setTimeout( adjust, 0 );}</script></head><body style="overflow: hidden">' + document.getElementById( 'xToolbarSpace' ).innerHTML + '</body></html>' ) ;
     93                        eTargetDocument.write( '<html><head>' + sBase + '<script type="text/javascript"> var adjust = function() { window.frameElement.height = document.body.scrollHeight ; }; '
     94                                        + 'window.onresize = window.onload = '
     95                                        + 'function(){'         // poll scrollHeight until it no longer changes for 1 sec.
     96                                        + 'var timer = null;'
     97                                        + 'var lastHeight = -1;'
     98                                        + 'var lastChange = 0;'
     99                                        + 'var poller = function(){'
     100                                        + 'var currentHeight = document.body.scrollHeight || 0;'
     101                                        + 'var currentTime = (new Date()).getTime();'
     102                                        + 'if (currentHeight != lastHeight){'
     103                                        + 'lastChange = currentTime;'
     104                                        + 'adjust();'
     105                                        + 'lastHeight = document.body.scrollHeight;'
     106                                        + '}'
     107                                        + 'if (lastChange < currentTime - 1000) clearInterval(timer);'
     108                                        + '};'
     109                                        + 'timer = setInterval(poller, 100);'
     110                                        + '}'
     111                                        + '</script></head><body style="overflow: hidden">' + document.getElementById( 'xToolbarSpace' ).innerHTML + '</body></html>' ) ;
    94112                        eTargetDocument.close() ;
    95113
    96114                        FCKTools.AddEventListener( eTargetDocument, 'contextmenu', FCKTools.CancelEvent ) ;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy