You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pi...@apache.org on 2015/01/21 21:07:16 UTC

[3/6] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34712 bug fix

FLEX-34712 bug fix

Popup is positioned incorrectly when called by systemManager_resizeHandler because calculatePopUpPosition()'s x or y may not be correct at that moment. Delaying the code call via callLater() solved the problem and allows the open popup to snap to its new position after device screen is rotated.

Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/706eb343
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/706eb343
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/706eb343

Branch: refs/heads/develop
Commit: 706eb343b83085fdf339026cdb8f27124896f63d
Parents: 6e0a356
Author: Kevin Godell <ke...@gmail.com>
Authored: Fri Jan 9 22:27:41 2015 -0600
Committer: Kevin Godell <ke...@gmail.com>
Committed: Fri Jan 9 22:27:41 2015 -0600

----------------------------------------------------------------------
 .../spark/src/spark/components/Callout.as       | 31 ++++++++++++--------
 1 file changed, 19 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/706eb343/frameworks/projects/spark/src/spark/components/Callout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/Callout.as b/frameworks/projects/spark/src/spark/components/Callout.as
index e7574b5..bfbb603 100644
--- a/frameworks/projects/spark/src/spark/components/Callout.as
+++ b/frameworks/projects/spark/src/spark/components/Callout.as
@@ -1683,19 +1683,26 @@ public class Callout extends SkinnablePopUpContainer
      */
     private function systemManager_resizeHandler(event:Event):void
     {
-        // Remove explicit settings if due to Resize effect
-        softKeyboardEffectResetExplicitSize();
+    	//callLater() solves bug FLEX-34712 only affecting device and not found on simulator
+    	//where calculatePopUpPosition()'s correct x or y may not be immediately available
+        callLater(
+            function():void
+            {
+                // Remove explicit settings if due to Resize effect
+                softKeyboardEffectResetExplicitSize();
         
-        // Screen resize might require a new arrow direction and callout position
-        invalidatePosition();
+                // Screen resize might require a new arrow direction and callout position
+                invalidatePosition();
         
-        if (!isSoftKeyboardEffectActive)
-        {
-            // Force validation and use new screen size only if the keyboard
-            // effect is not active. The stage dimensions may be invalid while 
-            // the soft keyboard is active. See SDK-31860.
-            validateNow();
-        }
+                if (!isSoftKeyboardEffectActive)
+                {
+                    // Force validation and use new screen size only if the keyboard
+                    // effect is not active. The stage dimensions may be invalid while 
+                    // the soft keyboard is active. See SDK-31860.
+                    validateNow();
+                }
+            }
+        );
     }
 }
-}
\ No newline at end of file
+}