PDA

View Full Version : [CLOSED] Ext.Msg.confirm broken in 1.0RC



alikic
11 Nov 2010, 12:54 PM
The provided function is called regardless which button I click on. Please find the test case below.



Ext.setup({
onReady: function() {
new Ext.Panel({
layout: {
type: 'vbox',
pack: 'center',
align: 'stretch'
},
fullscreen: true,
items: [{
xtype: 'button',
text: 'Confirm',
ui: 'confirm-round',
handler: function() {
Ext.Msg.confirm("Confirmation", "Are you sure you want to do that?", function() {
alert('Hey, both buttons end up here!');
});
}
}]
});
}
});

alikic
11 Nov 2010, 12:58 PM
I take this one back. I didn't notice that the behaviour of the component has changed. In previous releases the provided functions was invoked only on 'yes'. Sorry:)

evant
11 Nov 2010, 5:39 PM
Yeah that's right, we improved it so now you can handle callbacks for any button and make a decision as appropriate.

VinylFox
11 Nov 2010, 7:16 PM
...and consistent with the way the Ext JS library works.

The orig bug report for reference...
http://www.sencha.com/forum/showthread.php?113290-FIXED-496-Touch-ExtJS-Ext.MessageBox-handler-inconsistency&p=533290#post533290