Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Aug 2009
    Location
    Amsterdam, NY
    Posts
    38
    Vote Rating
    0
    Scott Murawski is on a distinguished road

      0  

    Default [FIXED-393][3.0.0] Ext.MessageBox maxWidth bug with fix

    [FIXED-393][3.0.0] Ext.MessageBox maxWidth bug with fix


    In the Ext.MessageBox code, there's the updateText function. It seems that opts.maxWidth isn't used in the width calculation. The code below is from Ext 3.0.0.

    Code:
            updateText : function(text){
                if(!dlg.isVisible() && !opt.width){
                    dlg.setSize(this.maxWidth, 100); // resize first so content is never clipped from previous shows
                }
                msgEl.update(text || ' ');
    
                var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0;
                var mw = msgEl.getWidth() + msgEl.getMargins('lr');
                var fw = dlg.getFrameWidth('lr');
                var bw = dlg.body.getFrameWidth('lr');
                if (Ext.isIE && iw > 0){
                    //3 pixels get subtracted in the icon CSS for an IE margin issue,
                    //so we have to add it back here for the overall width to be consistent
                    iw += 3;
                }
                var w = Math.max(Math.min(opt.width || iw+mw+fw+bw, opt.maxWidth || this.maxWidth),
                            Math.max(opt.minWidth || this.minWidth, bwidth || 0));

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,170
    Vote Rating
    674
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Agreed, thanks for the report.

    Fix applied to svn in rev #5792 for patch release 3.1.1.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1