-
14 Sep 2010 2:03 AM #1
[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.
-
14 Sep 2010 2:32 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
-
14 Sep 2010 4:01 AM #3
I have also this bug with ext 3.2.1 and this patch is included into this version.
-
16 Sep 2010 12:12 AM #4
I fixed this bug on 2.0.2 like this :
I add this to initDocReady :
the full initDocReady method :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();
and I add this html tag before all my </body> tags :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); };
This seems to work. What is your opinion on this solution?Code:<a id="ext-fixes-fin-chargement-dom" style="display:none"></a> </body>
Similar Threads
-
[2.2][FIXED] Ext.onReady and onLoad
By alayasf in forum Ext 2.x: BugsReplies: 124Last Post: 4 Mar 2010, 4:36 AM -
IE body onload is called before Ext.onReady
By jhachetan in forum Ext 3.x: Help & DiscussionReplies: 8Last Post: 9 Nov 2009, 2:55 PM -
[Ext2.2]Ext.OnLoad - not called?!
By Rob Wilson in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 14 Oct 2008, 6:51 AM -
OnReady OnLoad afterLoad problem
By sekaijin in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 5 Apr 2008, 3:48 AM


Reply With Quote