             
             if (textChanged)
             {
+                if (FlexVersion.compatibilityVersion > FlexVersion.VERSION_4_5) 
+                    preserveSelectionOnSetText = true;
+
                 // If the text has linebreaks (CR, LF, or CF+LF)
                 // create a multi-paragraph TextFlow from it
                 // and use the TextFlowTextLineFactory to render it.

         */
        public function get text():String 
        {
            // Extracting the plaintext from a TextFlow is somewhat expensive,
            // as it involves iterating over the leaf FlowElements in the TextFlow.
            // Therefore we do this extraction only when necessary, namely when

            // 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(
