1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    10
    Vote Rating
    0
    jothi35 is on a distinguished road

      0  

    Default [2.0.2/2.3.0/3.2.1] onReady and onLoad aren't called sometimes.

    [2.0.2/2.3.0/3.2.1] onReady and onLoad aren't called sometimes.


    I have a bug already described here.
    Some times, Ext.onready and onload event aren't never called.
    I have this bug on ext 2.0.2, ext 2.3.0 and ext 3.2.1 on ie8. With ext2.0.2, our clients have also this bug on ie6 and 7.
    Ext.onReady isn't called because document.readyState or defer.readyState is never update to complete. I think it's an ie bug but we have it only with Ext.
    Onto my 2.0.2, I change initDocReady to use "document.documentElement.doScroll('left')" like describe into this patch. But Ext.onReady is called too early.
    For information, I'm into iframe and this problem is described here.

    It's very urgent for us, we have a lot for client with this problem. And even if we migrate to v3.2.2 (Currently, We are buying it), we have the problem.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Link to the Ext 3.x patch (which I thought was included in Ext 3.2).

  3. #3
    Sencha User
    Join Date
    Sep 2010
    Posts
    10
    Vote Rating
    0
    jothi35 is on a distinguished road

      0  

    Default


    I have also this bug with ext 3.2.1 and this patch is included into this version.

  4. #4
    Sencha User
    Join Date
    Sep 2010
    Posts
    10
    Vote Rating
    0
    jothi35 is on a distinguished road

      0  

    Default


    I fixed this bug on 2.0.2 like this :

    I add this to initDocReady :
    Code:
    var initDocReady = function(){
      var doChk = function(){
        try{
          Ext.isReady || document.getElementById("ext-fixes-fin-chargement-dom").style;
        }catch(e){
          setTimeout(doChk ,5);
          return;
        }
        fireDocReady();
      };
    doChk();
    the full initDocReady method :
    Code:
    var initDocReady = function(){
            docReadyEvent = new Ext.util.Event();
            if(Ext.isGecko || Ext.isOpera) {
                document.addEventListener("DOMContentLoaded", fireDocReady, false);
            }else if(Ext.isIE){
                document.write("<s"+'cript id="ie-deferred-loader" defer="defer" src="/'+'/:"></s'+"cript>");
                var defer = document.getElementById("ie-deferred-loader");
                defer.onreadystatechange = function(){
                    if(this.readyState == "complete"){
                        fireDocReady();
                    }
                };
                
                //DEB ajout SIB
                var doChk = function(){
                    try{
                        Ext.isReady || document.getElementById("ext-fixes-fin-chargement-dom").style;
                    }catch(e){
                        setTimeout(doChk ,5);
                        return;
                    }
                    fireDocReady();
                 };
                 doChk();
                 //FIN ajout SIB
                 
            }else if(Ext.isSafari){
                docReadyProcId = setInterval(function(){
                    var rs = document.readyState;
                    if(rs == "complete") {
                        fireDocReady();
                     }
                }, 10);
            }
            
            E.on(window, "load", fireDocReady);
        };
    and I add this html tag before all my </body> tags :
    Code:
    <a id="ext-fixes-fin-chargement-dom" style="display:none"></a>
    </body>
    This seems to work. What is your opinion on this solution?

Similar Threads

  1. [2.2][FIXED] Ext.onReady and onLoad
    By alayasf in forum Ext 2.x: Bugs
    Replies: 124
    Last Post: 4 Mar 2010, 4:36 AM
  2. IE body onload is called before Ext.onReady
    By jhachetan in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 9 Nov 2009, 2:55 PM
  3. [Ext2.2]Ext.OnLoad - not called?!
    By Rob Wilson in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 14 Oct 2008, 6:51 AM
  4. OnReady OnLoad afterLoad problem
    By sekaijin in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 5 Apr 2008, 3:48 AM

Thread Participants: 1