You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/11/20 18:05:37 UTC
git commit: [flex-sdk] [refs/heads/develop] - FLEX-34454 don't assume
first modal has the blur
Repository: flex-sdk
Updated Branches:
refs/heads/develop 8806faa9b -> 27475c1c4
FLEX-34454 don't assume first modal has the blur
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/27475c1c
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/27475c1c
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/27475c1c
Branch: refs/heads/develop
Commit: 27475c1c4499debba59020dfed2179bf478f8392
Parents: 8806faa
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 3 10:34:02 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Nov 20 09:05:22 2014 -0800
----------------------------------------------------------------------
.../src/mx/managers/PopUpManagerImpl.as | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/27475c1c/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as b/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
index a6923a3..6d2061a 100644
--- a/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ b/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -34,6 +34,7 @@ import flash.events.MouseEvent;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.system.Capabilities;
+import flash.utils.Dictionary;
import mx.automation.IAutomationObject;
import mx.core.FlexGlobals;
@@ -176,6 +177,14 @@ public class PopUpManagerImpl extends EventDispatcher implements IPopUpManager
* An array of information about currently active popups
*/
mx_internal var popupInfo:Array = [];
+
+ /**
+ * @private
+ * The first popup to use a blur per systemManager.
+ * We need to track that in order to know when to remove the blur
+ * if stacks of modal popups are created and then taken down.
+ */
+ private var blurOwners:Dictionary = new Dictionary(true);
//--------------------------------------------------------------------------
//
@@ -956,6 +965,9 @@ public class PopUpManagerImpl extends EventDispatcher implements IPopUpManager
if (blurAmount)
{
+ if (blurOwners[sm] == null)
+ blurOwners[sm] = o.owner;
+
// Ensure we blur the appropriate top level document.
if (DisplayObject(sm).parent is Stage)
{
@@ -1031,10 +1043,9 @@ public class PopUpManagerImpl extends EventDispatcher implements IPopUpManager
fade.play();
var sm:ISystemManager = o.systemManager;
- var awm:IActiveWindowManager =
- IActiveWindowManager(sm.getImplementation("mx.managers::IActiveWindowManager"));
- // don't remove blur unless this is the last modal window
- if (awm.numModalWindows == 1)
+
+ // don't remove blur unless this is the first modal window to put up the blur
+ if (blurOwners[sm] != null && blurOwners[sm] == o.owner)
{
// Blur effect on the application