     
     /**
      *  @private
+     * 
+     *  If we just received a softKeyboardActivate event in the capture phase,
+     *  we will wait until the bubble phase to call ensureElementPositionIsVisible
+     *  For now, store the caret bounds to be used. 
      */
     private function caretBoundsChangeHandler(event:CaretBoundsChangeEvent):void
     {
         if (event.isDefaultPrevented())
             return;
         
-        // If the soft keyboard is not up yet, then just store the caretBounds
-        // It will be used in the softKeyboardActivateHandler
-        if (!isNaN(oldSoftKeyboardHeight))
-        {
-            ensureElementPositionIsVisible(lastFocusedElement, event.newCaretBounds, false);
-            event.preventDefault();
-        }
-        
-        lastFocusedElementCaretBounds = event.newCaretBounds;
-        
-        
+        event.preventDefault();
+
+        if (captureNextCaretBoundsChange)
+        {
+            lastFocusedElementCaretBounds = event.newCaretBounds;
+            captureNextCaretBoundsChange = false;
+            return;
+        }
+        
+        ensureElementPositionIsVisible(lastFocusedElement, event.newCaretBounds, false);
     }
 }
 

     */
    private var lastFocusedElementCaretBounds:Rectangle;
    
    //--------------------------------------------------------------------------
    //
    //  Properties

    }
    
    /**
     *  @private 
     *  Listen for softKeyboard activate in the capture phase so we know if
     *  we need to delay calling ensureElementPositionIsVisible if we get
     *  a caretBoundsChange event
     */ 
    private function softKeyboardActivateCaptureHandler(event:SoftKeyboardEvent):void
    {
        var keyboardRect:Rectangle = stage.softKeyboardRect;
        
        if (keyboardRect.width > 0 && keyboardRect.height > 0)
        {
            captureNextCaretBoundsChange = true;
        }
    }
    
    /**
     *  @private
     *  Called when the soft keyboard is deactivated. Tells the top level 
     *  application to resize itself and fix the scroll position if necessary
