From 74ab0ce48db31420c84226407131e611e3dd379f Mon Sep 17 00:00:00 2001 From: john Date: Wed, 26 Sep 2018 11:39:54 +0800 Subject: [PATCH] Roo/bootstrap/Modal.js --- Roo/bootstrap/Modal.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Roo/bootstrap/Modal.js b/Roo/bootstrap/Modal.js index 7beb1135f5..f7741b590f 100644 --- a/Roo/bootstrap/Modal.js +++ b/Roo/bootstrap/Modal.js @@ -269,7 +269,14 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { } if(!this.fitwindow && this.max_width !== 0){ + var w = Math.min(this.max_width, Roo.lib.Dom.getViewportWidth(true) - 30); + + if(this.height) { + this.setSize(w, this.height); + return; + } + var view_height = Roo.lib.Dom.getViewportHeight(true) - 60; var body_childs = this.bodyEl.dom.childNodes; -- 2.39.2