PDA

View Full Version : [CLOSED] Ext.Msg.alert disables UI



DonRul
28 Feb 2012, 5:01 PM
I have used Ext.Msg.alert in a number of instances and it consistently disables my UI.

Here is one example:


Ext.Ajax.request({
url: '../Services/PortalApp-Web-Services-PortalDomain.svc/JSON/SubmitChanges',

method: 'POST',
params: JSON.stringify(payload),
headers: {
'Accept': 'application/json, text/javascript, */*; q=0.01',
'Content-Type': 'application/json'
},
scope: this,
success: function (result) {
var response=Ext.JSON.decode(result.responseText);
Ext.Msg.alert('Success', 'Submitted successfully');
var patientOrderStore = Ext.data.StoreManager.lookup('PatientOrderStore');
patientOrderStore.load();
Ext.getCmp('maincarosel').setActiveItem(0);
},
failure: function (result, request) {
Ext.Msg.alert('Failed', 'Submission unsuccessful');
}
});


In all cases the messagebox displays and masks the UI. When you dismiss the messagebox there is a flicker but the mask is not removed from the UI.

This repros on Chrome, Safari, and iPad

Note also when I try to use the callback from the messagebox the callback is never fired.

Ext.Msg.alert('Success', 'Submitted successfully', function (){
var test = "never get here";
});

aconran
28 Feb 2012, 8:39 PM
Ext JS or Sencha Touch? Version?

DonRul
28 Feb 2012, 8:40 PM
Touch Designer Build 298
Library http://extjs.cachefly.net/touch/sencha-touch-designer-edition/

I had this problem on the prior version and it didn't go away with the latest.

aconran
28 Feb 2012, 9:03 PM
Doesn't appear to manifest itself in the standard touch example:
http://extjs.cachefly.net/touch/sencha-touch-designer-edition/examples/kitchensink/#demo/overlays

DonRul
28 Feb 2012, 9:05 PM
I have a sandbox sample if it is useful to you.

It is at http://pgxportal.com/Mobile/index.html

Note that on the login screen if you mess up the password the messagebox works fine.

If you refresh to bring back the test creds and then log in I change the viewport on successful login:

me.navView = Ext.create('PgxPortal.view.MainNav');
Ext.Viewport.add(me.navView);
patientOrderStore.load(function() {
var loginPanel = me.getLoginPanel();
loginPanel.hide();
});

After that point the Ext.Msg.alert problem occurrs everywhere.
You can see an example by logging in and then clicking the "Print Manifest" button on the toolbar.

aconran
28 Feb 2012, 9:10 PM
tapping print manifest after logging in simply shows a loading indicator and then goes away

I do not see a dialog

DonRul
29 Feb 2012, 8:50 AM
Sorry, I didn't prop the last change to the AWS server
It is there now.

DonRul
8 Mar 2012, 1:21 PM
Just upgraded to build 309 with no change in symptoms.

aconran
8 Mar 2012, 1:59 PM
What version of Touch are you linking to?

DonRul
8 Mar 2012, 2:04 PM
http://extjs.cachefly.net/touch/sencha-touch-designer-edition/

I've always just accepted the default

aconran
8 Mar 2012, 2:15 PM
That was running beta3 but we've upgraded it to final as of today.

Please verify that you still having the issue.

DonRul
8 Mar 2012, 2:22 PM
Yes, the problem is consistent across the last several builds.

DonRul
8 Mar 2012, 2:33 PM
Fixing a different problem may have cleared it up.

I have two (of several) controllers called Login and and OrderNewTest

I noticed that every time I clicked on the OrderNewTest that the handler for the Login button fired as well.

Looking into the Controller action for Login, the controlQuery was set to 'button' rather than the ID of the specific button for the login controller.

It looks like it was catching all button Tap events. That would mean that it was logging in every time I tapped on the OK button for alerts.

This would have set a mask and should later have cleared it after login. I am not sure why it wasn't eventually clearing but making the event handler more specific seems to have cleared the problem.

Thanks,
Don Rule

aconran
8 Mar 2012, 2:59 PM
Glad to hear you resolved it.

DonRul
8 Mar 2012, 3:01 PM
Not as glad as I am. There were several other odd behaviors that cleared up once I found this.

Thanks

Phil.Strong
9 Mar 2012, 7:03 AM
awesome!