             
             selectionAnchorIndexChanged = false;
             selectionActiveIndexChanged = false;
+        }
+
+        if (horizontalScrollPositionChanged)
+        {
+            textFlow.controller.horizontalScrollPosition =
+                _horizontalScrollPosition;
+            horizontalScrollPositionChanged = false;
+        }
+
+        if (verticalScrollPositionChanged)
+        {
+            textFlow.controller.verticalScrollPosition =
+                _verticalScrollPosition;
+            verticalScrollPositionChanged = false;
         }
     }
 

import text.elements.ParagraphElement;
import text.elements.SpanElement;
import text.elements.TextFlow;
import text.formats.BlockProgression;
import text.formats.CharacterFormat;
import text.formats.ContainerFormat;


    /**
     *  @private
     */
    private function textFlow_composeDoneHandler(event:ComposeDoneEvent):void
    {
        var newContentWidth:Number =
            textFlow.controller.maxHorizontalScrollPosition;
        var newContentHeight:Number =
            textFlow.controller.maxVerticalScrollPosition;
        
        if (newContentWidth != _contentWidth ||
            newContentHeight != _contentHeight)
        {
            _contentWidth = newContentWidth;
            _contentHeight = newContentHeight;
        
            dispatchEvent(new Event("contentSizeChanged"));
        }
    }
    
    /**
     *  @private
     *  Called when the EditManager dispatches a 'selectionChange' event.
     */
    private function editManager_selectionChangeHandler(event:SelectionChangedEvent):void
