mercredi 16 avril 2014

Anyone seen a weird Ext.MessageBox issue? [v2.3.0]

I'm using version 2.3.0, and I've come across a weird issue. Through an Ext.Msg.alert() function, I show a message box. After it is shown, I click the [OK] button, however the message box is not dismissed. The [OK] button is disabled however. The MessageBox also seems to become disconnected with the Ext.Msg object. I'll explain a little bit.

Ext.Msg.isHidden() is not false, even though a message box is visible. Further changes with Ext.Msg.show() or alert() will refresh the current message box's configs (can see a visual update), but the same end result happens: the box is not dismissed when a button is pressed, and the message box freezes up. The modal background disappears too when a button is pressed.


More details on the setup:

In an exception listener on a proxy, I've put a Ext.Msg.alert if a web call fails. The message box only seems to bug out when it's executed from here. In other places, I call Ext.Msg.show() and in those instances, this issue never appears (The dismissal of the message box works everytime).


Some debugging I've done:

- The onClick method is executed when a button is pressed, but the message box is not hidden, as maybe the box already thinks it's hidden?, and the hiddenchange event isn't fired.

- Replaced [v2.3.0] sencha touch src code with [v2.2.1] sencha touch src, and the issue is not there, which got me to compare changes in the MessageBox class; but nothing seemed to be the cause

- Wasn't able to reproduce this in a sencha fiddle, which disheartened me.

- The issue seems to be alleviated if I put delay with a defer function to show the message box. (Ex: put a Ext.defer() of 500ms, and the message box is dismissed fine every single time, but it just shows up a little late to the party)

- Tried messing with some scope variables, but my attempts failed to improve the situation.


So what I'm wondering as it only seems to happen in a exception listener on a proxy, is there some scope or timing issue? that causes the message box to lose track of it's _hidden state?


Any speculations or debugging advice would be useful to me as I'm out of ideas, haha.


Thanks!





Aucun commentaire:

Enregistrer un commentaire