You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2022/12/12 10:32:21 UTC

[royale-asjs] branch develop updated: Scrolling should be optional

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new c56c87f047 Scrolling should be optional
c56c87f047 is described below

commit c56c87f0477dafd88fe29f9c831fa268d4b3b2cd
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Dec 12 12:32:14 2022 +0200

    Scrolling should be optional
---
 .../core/BrowserResizeApplicationListener.as       | 24 +++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/BrowserResizeApplicationListener.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/BrowserResizeApplicationListener.as
index 052fb56306..68e8d4bee7 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/BrowserResizeApplicationListener.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/BrowserResizeApplicationListener.as
@@ -54,6 +54,27 @@ COMPILE::JS
 		}
 		
         private var app:IInitialViewApplication;
+
+        private var _enableScroll:Boolean = true;
+        /**
+         * If enableScroll is true, the application will be set to overflow:auto
+         * if false, the application will default to what is otherwise set.
+         * 
+         * @langversion 3.0
+         * @playerversion Flash 10.2
+         * @playerversion AIR 2.6
+         * @productversion Royale 0.9.10
+         * 
+         */
+        public function get enableScroll():Boolean
+        {
+        	return _enableScroll;
+        }
+
+        public function set enableScroll(value:Boolean):void
+        {
+        	_enableScroll = value;
+        }
         
         private var _minHeight:Number;
         
@@ -129,7 +150,8 @@ COMPILE::JS
                     document.body.style.minWidth = this.minWidth + 'px';
                 if (!isNaN(this.minHeight))
                     document.body.style.minHeight = this.minHeight + 'px';
-                document.body.style.overflow = 'auto';
+                if (enableScroll)
+                    document.body.style.overflow = 'auto';
             }
         }