From: john Date: Wed, 26 Sep 2018 03:44:06 +0000 (+0800) Subject: Roo/bootstrap/Modal.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=47a7f6b7198fa4d016637ff1d4b698edd5df9601 Roo/bootstrap/Modal.js --- diff --git a/Roo/bootstrap/Modal.js b/Roo/bootstrap/Modal.js index 9945bb1105..989bd9ee7e 100644 --- a/Roo/bootstrap/Modal.js +++ b/Roo/bootstrap/Modal.js @@ -278,27 +278,16 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { } var view_height = Roo.lib.Dom.getViewportHeight(true) - 60; - var body_childs = this.bodyEl.dom.childNodes; var body_height = 0; for(var i = 0; i < body_childs.length; i++) { body_height += body_childs[i].offsetHeight; } - // this.setSize(w, this.height || view_height); - - + if(body_height + this.headerEl.getHeight() + this.footerEl.getHeight() > view_height) { + this.setSize(w, this.height || view_height); + } - // - // if( - // ( - // this.headerEl.getHeight() + - // this.bodyEl.getHeight() + - // this.footerEl.getHeight() - // ) > view_height) { - // } { - // this.setSize(w,view_height); - // } } },