PDA

View Full Version : [NOREPRO] Bug on Ext.window.MessageBox



pichanz
18 May 2014, 11:14 AM
Hello,
I don't know if it's a bug or not, but i suppose Ext JS message box will adjust the height of the messagebox by it's content.

But, when i try the messagebox not always adjust the height. Depending on the message on the messagebox the text will be truncated because of the lack of height on the messagebox.

What i found is if the text is too long, the messagebox will be truncated.

Example:
This message box will work fine

Ext.Msg.alert('Test 1',"Message box test<br/>Line1<br/>Line2<br/><br/><br/><br/><br/>Line3");

But this messagebox will have the height truncated. because of the long text. and the long text will be wrapped.

Ext.Msg.alert('Test 2', "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/>"+
"Lorem ipsum dolor sit amet<br/>"+
"Lorem ipsum dolor sit amet<br/>"+
"Lorem ipsum dolor sit amet<br/><br/>"+
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br/>"+
"Lorem ipsum dolor sit amet<br/>");


Any solution on how to adjust the height automatically?
Or is this a bug.

I am using ExtJS 5.0.0.736

Thanks

mitchellsimoens
19 May 2014, 3:41 AM
Thanks for the report! I have opened a bug in our bug tracker.

gtdev
19 May 2014, 7:36 AM
I noticed the same bug too. Here is my dirty fix in the meantime:



Ext.override(Ext.window.MessageBox, {
onShow: function () {
var box = this.getBox();
this.setSize(box.width, box.height);
this.callParent(arguments);
}
});

dolev
8 Mar 2015, 1:07 AM
It's frustrating.