Ticket #2135: 2135.patch

File 2135.patch, 2.2 KB (added by Martin Kou, 16 years ago)
  • _whatsnew.html

     
    6464                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2322">#2322</a>] Fixed the issue
    6565                        where the fit window command loses the current selection and scroll position in the
    6666                        editing area.</li>
     67                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2135">#2135</a>] Fixed a
     68                        data loss bug in IE when there are @import statements in the editor's CSS files,
     69                        and IE's cache is set to "Check for newer versions on every visit".</li>
    6770        </ul>
    6871        <p>
    6972                <a href="_whatsnew_history.html">See previous versions history</a></p>
  • editor/_source/classes/fckeditingarea.js

     
    151151                if ( oIFrame.readyState && oIFrame.readyState != 'completed' )
    152152                {
    153153                        var editArea = this ;
    154                         ( oIFrame.onreadystatechange = function()
    155                         {
    156                                 if ( oIFrame.readyState == 'complete' )
     154                        var timer = setInterval( function()
    157155                                {
    158                                         oIFrame.onreadystatechange = null ;
    159                                         editArea.Window._FCKEditingArea = editArea ;
    160                                         FCKEditingArea_CompleteStart.call( editArea.Window ) ;
    161                                 }
    162                         // It happened that IE changed the state to "complete" after the
    163                         // "if" and before the "onreadystatechange" assignement, making we
    164                         // lost the event call, so we do a manual call just to be sure.
    165                         } )() ;
     156                                        // This is a simplified version of the domReady algorithm
     157                                        // described in John Resig's book "Pro JavaScript Techniques".
     158                                        // See http://books.google.com/books?id=GgJN2CC_2s4C page 90.
     159                                        if ( editArea.Window.document &&
     160                                                        editArea.Window.document.body &&
     161                                                        editArea.Window.document.getElementsByName &&
     162                                                        editArea.Window.document.getElementById )
     163                                        {
     164                                                editArea.Window._FCKEditingArea = editArea ;
     165                                                FCKEditingArea_CompleteStart.call( editArea.Window ) ;
     166                                                clearInterval( timer ) ;
     167                                        }
     168                                }, 30 ) ;
    166169                }
    167170                else
    168171                {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy