PDA

View Full Version : [FIXED-1214] Ext.onReady code changed in 3.3x?



realjax
16 Aug 2010, 1:17 AM
Out of curiousity.. has anything changed in the Ext.onReady code for 3.3x?

I have problems with IE7, 'cannot open the internet site, Operation Aborted.' An error that's not there in 3.2x and older versions.

I traced it back to the moment Ext.onReady is called in my application...


Update: it seems adding {delay:50} as an option with onReady solves my issue for 3.3x
Update2: Not always, still get the operation aborted message now and then..
Update3: I *HATE* Internet explorer.

evant
16 Aug 2010, 1:56 AM
Not significantly since Ext 3.2, no.

realjax
16 Aug 2010, 5:20 AM
Well... a FYI then :)

evant
16 Aug 2010, 5:25 AM
Care to post a test case?

realjax
16 Aug 2010, 6:44 AM
Yes, thought about that, but it is a little hard to post a simple working testcase.
Here's how things work in my development setup, maybe that is of some help..
My index.html page has an include to a bootstrapper.js file, which in turn loads about 60 javascript source files (the application). And one calls Ext.onReady(), which is when the error occurs.
The production environment of course uses one single build for this. (haven't yet tested how a single 3.3x build works with IE 7 by the way)

Worked ok up to 3.2, but as of 3.3x I'm getting these IE errors...

Jamie Avins
16 Aug 2010, 10:30 AM
I think there was a bug fixed recently which was causing onReady to fire more than once. Might have something to do with it. Which beta or svn version are you using?

realjax
16 Aug 2010, 11:00 PM
Hi Jamie, problem occurs in both beta1 and 2 of 3.3

realjax
17 Aug 2010, 12:55 AM
If you are interested, I traced it back to this piece of code in src\ext-core\src\core\EventManager.js (around line 642)

in 3.3x this reads


Ext.isReady = initExtCss();

if (!Ext.isReady) {
Ext.onReady(initExtCss);
}Whereas 3.2.2 reads:


if(!initExtCss()){
Ext.onReady(initExtCss);
}Replacing the 3.3 part with the 3.2.2 code fixes my IE issue..

Jamie Avins
18 Aug 2010, 9:58 AM
Thank you for the report and helping to track it down, we're reviewing the change.

evant
15 Sep 2010, 8:38 PM
Is it possible to provide a simple test case? During testing with IE7 I was never able to cause the onReady to break, it consistently ran without issue.

uwolfer
28 Sep 2010, 11:24 PM
Replacing the 3.3 part with the 3.2.2 code fixes my IE issue..

I have exactly the same issue and replacing helps here as well.

It also breaks things in Chrome 6 and IE 7 btw.

I don't have a standalone testcase right now, but i assume that loading scripts and css dynamically might cause the issue.

sowmyav82
10 Oct 2010, 8:26 PM
Any update on this issue? I am stuck because of the Ext.onReady getting fired multiple times issue.

Here is my scenario:

We have multiple user controls which are common across pages. Each user control has its own Ext.onReady function to take care of its components.

If I have an alert in Ext.onReady, it gets shown only once and only after the page has finished loading in the browser until 3.2.1. However with 3.3 rc, alert is being shown multiple times.

Thanks in advance.

evant
10 Oct 2010, 8:41 PM
Can you post a test case?

sowmyav82
11 Oct 2010, 2:52 AM
Hi,

I have attached a asp.net project which can be used to demonstrate the issue I am facing.

Here I have a simple master page, a login page (which can be browsed) and a control (Login popup control.js). The reason we have a different control for login is because we allow logins from multiple locations. There is a ext.onReady function in this js file where I have an alert.

For easy reference, I have included both ext 2.3 and 3.3 js files in the project. In the master page currently I have 2.3 included. When you browse for Login.aspx in this, you will see onReady and onReady from Login alerts fire only once and in that order. If you can comment 2.3 extjs includes and uncomment extjs 3.3 includes, you will see that onReady gets fired twice and onReady from Login doesnt get fired.

Please let me know if you need any further info.

Thanks in advance.

evant
11 Oct 2010, 4:12 AM
Is your example meant to crash like that? After I comment out the stuff that initializes the login page, the behaviour is as you would expect on IE.

sowmyav82
11 Oct 2010, 5:18 AM
Please ignore the earlier attachment. Take this one instead. This attachment will not crash.

Loginpopup control (js file) is meant to shown the login controls as either popup or as a normal div. It has the methods - show etc that make the login popup show. Login.aspx calls the show on this file and sets isPopup to false as its contents need to be rendered in the div. Other locations in the web application, call show with isPopup true whenever they want to show login controls as a popup.

evant
11 Oct 2010, 5:38 AM
Your test case still crashes, line 66 LoginPopupControl.js.

sowmyav82
11 Oct 2010, 7:47 PM
Hi Evan,

I do not get any javascript or other errors with the latest attachment. I have hosted the application(downloaded the attachment to my post) in IIS as a virtual directory and 4.0 target version. I browsed login.aspx and am able to see alerts without any issues. Can you please tell me what you tried?

evant
11 Oct 2010, 8:48 PM
I'm not really sure. It would be useful if you could extract out the .NET stuff, it's not really necessary to show the issue, I assume.

sowmyav82
11 Oct 2010, 9:37 PM
Evan,

I have attached a html page which is a better testcase.

Instructions to run this testcase:
1. Copy the file in the attached zip to examples\form folder under the extjs distribution.
2. When this is done in Ext 3.3 distribution, you get an alert ‘bug in Ext.onReady: container div should have been available by now’, but in ext 321 distribution, you get ‘Ext.onReady works fine’.
3. It works fine in ext 3.3 if ext-base.js and ext-all.js are included in the <head> element instead of the <body> element. This is not a requirement in ext 321.

sowmyav82
13 Oct 2010, 8:35 PM
Hi Evan,

Were you able to reproduce with the given testcase?

danigoldman
14 Oct 2010, 9:45 AM
If you are interested, I traced it back to this piece of code in src\ext-core\src\core\EventManager.js (around line 642)

in 3.3x this reads


Ext.isReady = initExtCss();

if (!Ext.isReady) {
Ext.onReady(initExtCss);
}Whereas 3.2.2 reads:


if(!initExtCss()){
Ext.onReady(initExtCss);
}Replacing the 3.3 part with the 3.2.2 code fixes my IE issue..

I ran into the same issue with our application, where the application's boot loader's init() ran before the other dependent javascript files were loaded into memory. With 3.2.2, all works fine.

The above code change, apparently was the culprit. Replacing with the 3.2.2 code did indeed fix it for me.

(The 3.3.0 code failed in both FF and IE)

evant
14 Oct 2010, 5:13 PM
@sowmyav82 Yes I can confirm, thanks. Looking into it.

evant
20 Oct 2010, 6:41 PM
I've since reverted the change, it seems to be causing more problems that it solved.

thomaschang
23 Oct 2010, 5:21 PM
I'm a newbie of Ext Js less than 2 wks. I got the same problem too. Here is my simplest testcase. I'd like to incorporate your Demo example of Desktop with a tip of preloader of message at this url (http://www.ajaxblender.com/howto-create-preloader-like-at-extjs-com.html ). It works fine with 3.2.1 , but got error of "MyDesktop undefined" with 3.3.0. Both senarios were tested on IE & Firefox and got consistent results.

jsut in case you need a simple testcase for later modifications