Roo/bootstrap/panel/Content.js
authorAlan Knowles <alan@roojs.com>
Tue, 2 Feb 2021 02:23:00 +0000 (10:23 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 2 Feb 2021 02:23:00 +0000 (10:23 +0800)
Roo/bootstrap/panel/Content.js

index 798d3db..617937f 100644 (file)
@@ -81,6 +81,10 @@ Roo.bootstrap.panel.Content = function( config){
             }
                         
             this.el = Roo.DomHelper.append(document.body, elcfg , true);
+            if (this.iframe) {
+                this.iframeEl = this.el.select('iframe',true).first();
+            }
+            
         }
     } 
     this.closable = false;
@@ -177,7 +181,7 @@ Roo.bootstrap.panel.Content = function( config){
 
     
     
-    if(this.autoScroll){
+    if(this.autoScroll && !this.iframe){
         this.resizeEl.setStyle("overflow", "auto");
     } else {
         // fix randome scrolling
@@ -256,11 +260,15 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, {
         return true;
     },
     /**
-     * Updates this panel's element
+     * Updates this panel's element (not for iframe)
      * @param {String} content The new content
      * @param {Boolean} loadScripts (optional) true to look for and process scripts
     */
     setContent : function(content, loadScripts){
+        if (this.iframe) {
+            return;
+        }
+        
         this.el.update(content, loadScripts);
     },