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

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

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!');

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:)

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.

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

The orig bug report for reference...