         private function textContainerManager_selectionChangeHandler(
             event:SelectionEvent):void
         {
+            if (preserveSelectionOnSetText)
+                return;
+            
             var oldAnchor:int = _selectionAnchorPosition;
             var oldActive:int = _selectionActivePosition;
             

                else
                {
                    _textContainerManager.setText(_text);
                }
            }
            else if (textFlowChanged)
            {

            // not the underlying text.
            if (displayAsPasswordChanged)
            {
                preserveSelectionOnSetText = true;
                
                // If there is any text, convert it to the passwordChar.
                if (displayAsPassword)
                {
                    // Make sure _text is set with the actual text before we
                    // change the displayed text.
                    _text = _textContainerManager.getText("\n");
                    
                    // Paragraph terminators are lost during this substitution.
                    var textToDisplay:String = StringUtil.repeat(
