From 47a7f6b7198fa4d016637ff1d4b698edd5df9601 Mon Sep 17 00:00:00 2001 From: john Date: Wed, 26 Sep 2018 11:44:06 +0800 Subject: [PATCH] Roo/bootstrap/Modal.js --- Roo/bootstrap/Modal.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) 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); - // } } }, -- 2.39.2