     private var invalidateAncestorsVisibleFlag:Boolean = true;
     
     /**
+     *  If a complete event is pending when we are about to show the StageText,
+     *  we set this flag to wait for the complete event before showing it.
+     *  Otherwise, the StageText may show then snap to a new location when the
+     *  complete event happens.
+     */
+    private var showOnComplete:Boolean = false;
+    
+    /**
      *  Ancestors watched for changes in visibility or geometry. Any change in
      *  an ancestor's visibility or position may affect the StageText's 
      *  visibility or position.

        
        if (!isDesktop && viewTransitionRunning && isAndroid)
            ignoreProxyUpdatesDuringTransition = true;
    }
    
    private function stageText_focusInHandler(event:FocusEvent):void

        {
            if (stageText != null)
            {
                var calculatedVisible:Boolean = _visible && calcAncestorsVisible();
                
                if (completeEventPending && calculatedVisible)
                {
                    showOnComplete = true;
                }
                else
                {
                    if (immediate)
                    {
                        stageText.visible = calculatedVisible;
                        
                        // The focused stageText may have been replaced by a bitmap during
                        // an animation. When restoring its visibility, restore its focus as
                        // well if the soft keyboard is open. (If the soft keyboard is not
                        // open, do not restore focus because doing so will force the soft
                        // keyboard to open.)
                        if (stageText.visible && stageText == focusedStageText && 
                            stage.softKeyboardRect.height > 0)
                        {
                            stageText.assignFocus();
                        }
                        
                        // Do not remove the proxy bitmap until after stageText has been
                        // made visible to reduce flicker.
                        disposeProxyImage();
                        stageTextVisibleChangePending = false;
                        removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
                    }
                    else
                    {
                        stageTextVisible = calculatedVisible;
                        stageTextVisibleChangePending = true;
                        addEventListener(Event.ENTER_FRAME, enterFrameHandler);
                    }
                }
            }
        }
