PDA

View Full Version : [FIXED] When header property set to false, MessageBox is not able to display



jonathanmv
17 Dec 2013, 7:21 AM
The reconfigure method of the MessageBox has a line that hides or shows the close button based on the closable property as you can see below



me.header.child('[type=close]').setVisible(me.closable);


However, the header property can be set to false as pointed out by the documentation of the panel.
The solution could be a simple validation of the header property

You can see a Fiddle here (https://fiddle.sencha.com/#fiddle/28d) or review the simple code to reproduce this issue


Ext.application({
name: 'Fiddle',


launch: function() {
var messageBox = new Ext.create('Ext.window.MessageBox', {
header: false
});
//The messageBox won't be displayed because header is set to false
messageBox.show();
}
});

jonathanmv
17 Dec 2013, 7:37 AM
It happens that the MessageBox won't be displayed either if the closable property is set to false.
You can try with the fiddle I posted just replacing header: false to closable: false. You'll get the same error in the same line because for some reason, when closable is false, the header property is not set

Gary Schlosberg
19 Dec 2013, 6:23 AM
Thanks for the report! I have opened a bug in our bug tracker.