Roo/MessageBox.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 22 Dec 2011 05:05:18 +0000 (13:05 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 22 Dec 2011 05:05:18 +0000 (13:05 +0800)
Roo/MessageBox.js

index bdd9190..b0798c0 100644 (file)
@@ -170,8 +170,11 @@ Roo.MessageBox = function(){
                 dlg.resizeTo(this.maxWidth, 100); // resize first so content is never clipped from previous shows
             }
             msgEl.innerHTML = text || '&#160;';
-            var w = Math.max(Math.min(opt.width || msgEl.offsetWidth, this.maxWidth), 
-                        Math.max(opt.minWidth || this.minWidth, bwidth));
+            
+            var w = Math.max(
+                    Math.min(opt.width || Math.max(msgEl.offsetWidth, msgEl.scrollWidth), this.maxWidth), 
+                    Math.max(opt.minWidth || this.minWidth, bwidth)
+            );
             if(opt.prompt){
                 activeTextEl.setWidth(w);
             }