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

joshtynjala 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 6489e93787 Jewel: remove check in TileHorizontalLayout that avoids 
using observeElementSize on macOS
6489e93787 is described below

commit 6489e93787619a74d44d5226de4fdd234c1ee9f8
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Jul 1 12:55:44 2025 -0700

    Jewel: remove check in TileHorizontalLayout that avoids using 
observeElementSize on macOS
    
    The layout was waiting until mouseenter to adjust itself on macOS, which 
makes things jump around suddenly, which is really undesirable.
    
    I'm not sure why this macOS exception was necessary. Maybe Safari didn't 
support something at the time. However, everything appears to be working fine 
now.
    
    Related commit: bae2b99
---
 .../apache/royale/jewel/beads/layouts/TileHorizontalLayout.as | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/TileHorizontalLayout.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/TileHorizontalLayout.as
index fc419d2e20..39beadec0d 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/TileHorizontalLayout.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/TileHorizontalLayout.as
@@ -152,14 +152,9 @@ package org.apache.royale.jewel.beads.layouts
                        hostComponent.replaceClass("tile");
                        hostComponent.dispatchEvent(new 
org.apache.royale.events.Event("layoutNeeded"));
                        
-                       COMPILE::JS{
-                               //OSUtils.getOS() == OSUtils.MAC_OS || 
OSUtils.getOS() == OSUtils.IOS_OS ??
-                       var isMac:Boolean = OSUtils.getOS() == OSUtils.MAC_OS;
-                               if(!isMac)
-                                       
observeElementSize(hostComponent.element, observedChangeSize);
-                               else
-                                       // TODO - To be tested (scroll - 
mouseenter - ...?)
-                       hostComponent.element.addEventListener('mouseenter', 
observedChangeSize);                
+                       COMPILE::JS
+                       {
+                               observeElementSize(hostComponent.element, 
observedChangeSize);              
             }
                }
 

Reply via email to