You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/03/03 21:59:31 UTC

[royale-asjs] branch develop updated: set focus manager in popups. SHould fix #745

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

aharui 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 1aa18c8  set focus manager in popups.  SHould fix #745
1aa18c8 is described below

commit 1aa18c85abe52b9073681df2a72e32477f49ef4b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Mar 3 13:59:10 2020 -0800

    set focus manager in popups.  SHould fix #745
---
 .../MXRoyale/src/main/royale/mx/managers/PopUpManager.as    | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
index 97f79ef..d548bde 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
@@ -34,8 +34,8 @@ import org.apache.royale.core.IPopUpHostParent;
 import org.apache.royale.core.IStrand;
 import org.apache.royale.core.IUIBase;
 import org.apache.royale.html.beads.plugin.IModalDisplay;
-import org.apache.royale.utils.UIUtils;
-
+import org.apache.royale.utils.UIUtils;
+
 
 /**
  *  The PopUpManager singleton class creates new top-level windows and
@@ -206,6 +206,15 @@ public class PopUpManager
         }
         if (popUpHost is UIComponent)
             (window as UIComponent).systemManager = (popUpHost as UIComponent).systemManager;
+        if (window is IFocusManagerContainer)
+        {
+            if (!IFocusManagerContainer(window).focusManager)
+			{
+                // Popups get their own focus loop
+                IFocusManagerContainer(window).focusManager =
+                    new FocusManager(IFocusManagerContainer(window), true);
+			}
+        }
         popUpHost.popUpParent.addElement(window as IUIComponent);
     }