You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2020/12/29 12:27:11 UTC

[royale-asjs] branch ChildResize updated: Make sure scrollbars don't prevent a height measurement

This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch ChildResize
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/ChildResize by this push:
     new 02a50e8  Make sure scrollbars don't prevent a height measurement
02a50e8 is described below

commit 02a50e8faffcbd6b0dce316934f58438c53240ab
Author: Yishay Weiss <yi...@hotmail.com>
AuthorDate: Tue Dec 29 14:16:10 2020 +0200

    Make sure scrollbars don't prevent a height measurement
---
 .../MXRoyale/src/main/royale/mx/core/UIComponent.as      | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index 27a3ba0..2478e60 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -2315,13 +2315,17 @@ COMPILE::JS
                 var oldWidth:Object;
                 var oldLeft:String;
                 var oldRight:String;
+                var oldOverflow:String;
                 oldWidth = this.positioner.style.width;
                 oldLeft = this.positioner.style.left;
                 oldRight = this.positioner.style.right;
+                oldOverflow = this.positioner.style.overflow;
                 if (oldLeft.length && oldRight.length) // if both are set, this also dictates width
                     return 0; // this.positioner.style.left = "";
                 if (oldWidth.length)
                     this.positioner.style.width = "";
+                if (oldOverflow.length)
+                   this.positioner.style.overflow = "unset";
                 var mw:Number = this.positioner.offsetWidth;
                 if (mw == 0 && numChildren > 0)
                 {
@@ -2333,6 +2337,8 @@ COMPILE::JS
                             mw = Math.max(mw, child.getExplicitOrMeasuredWidth());
                     }
                 }
+                if (oldOverflow.length)
+                    this.positioner.style.overflow = oldOverflow;       
                 if (oldWidth.length)
                     this.positioner.style.width = oldWidth;
                 if (oldLeft.length && oldRight.length) // if both are set, this also dictates width
@@ -2390,13 +2396,17 @@ COMPILE::JS
                 var oldHeight:Object;
                 var oldTop:String;
                 var oldBottom:String;
+                var oldOverflow:String;
                 oldTop = this.positioner.style.top;
                 oldBottom = this.positioner.style.bottom;
                 oldHeight = this.positioner.style.height;
-                if (oldHeight.length)
-                    this.positioner.style.height = "";
+                oldOverflow = this.positioner.style.overflow;
                 if (oldTop.length && oldBottom.length) // if both are set, this also dictates height
                     return 0; //this.positioner.style.top = "";
+                if (oldHeight.length)
+                    this.positioner.style.height = "";
+		if (oldOverflow.length)
+		    this.positioner.style.overflow = "unset";
                 var mh:Number = this.positioner.offsetHeight;
                 if (mh == 0 && numChildren > 0)
                 {
@@ -2409,6 +2419,8 @@ COMPILE::JS
                 }
                 if (oldHeight.length)
                     this.positioner.style.height = oldHeight;
+		if (oldOverflow.length)
+		    this.positioner.style.overflow = oldOverflow;	
                 if (oldTop.length && oldBottom.length) // if both are set, this also dictates width
                     this.positioner.style.top = oldTop;
                 if (!isNaN(percentHeight))