Ticket #3661: 3661.patch

File 3661.patch, 850 bytes (added by Martin Kou, 15 years ago)
  • _source/core/scriptloader.js

     
    8484
    8585                        var checkLoaded = function( url, success )
    8686                        {
    87                                 ( success ? completed : failed).push( url );
     87                                ( success ? completed : failed ).push( url );
    8888
    8989                                if ( --scriptCount <= 0 )
    9090                                        doCallback( success );
     
    146146                                                /** @ignore */
    147147                                                script.$.onload = function()
    148148                                                {
    149                                                         onLoad( url, true );
     149                                                        // Some browsers, such as Safari, may call the onLoad function
     150                                                        // immediately. Which will break the loading sequence. (#3661)
     151                                                        setTimeout( function() { onLoad( url, true ); }, 0 );
    150152                                                };
    151153
    152154                                                // FIXME: Opera and Safari will not fire onerror.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy