[ 
https://issues.apache.org/jira/browse/FLEX-33544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13656904#comment-13656904
 ] 

Justin Mclean commented on FLEX-33544:
--------------------------------------

This many not be the right place for this bug you may have to post it here:

That being said I was curious and tried this in Apache Flex:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"; 
                           xmlns:s="library://ns.adobe.com/flex/spark" 
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           initialize="init(event)">
        
        <s:layout>
                <s:VerticalLayout />
        </s:layout>

        <fx:Script>
                <![CDATA[
                        import mx.events.FlexEvent;
                        import spark.utils.TextFlowUtil;
                        
                        protected function init(event:FlexEvent):void
                        {
                                rt1.textFlow = 
TextFlowUtil.importFromString("Hi there\nthis\nspans several\nlines", 
"preserve");
                        }
                        
                ]]>
        </fx:Script>
        <s:Label text="MultiLine" />
        <s:RichEditableText id="rt1" height="100%" multiline="true" 
editable="true" />
        <s:Label text="SingleLine" />
        <s:RichEditableText id="rt2" height="100%" multiline="false" 
editable="true" text="copy to here" />
        
</s:Application>

It works as expected (on a Mac), however it is internally converting the \r to 
\n when you past from one field to the other.

Looking at handlePasteOperation it does indeed only deal with \n's and not 
\r's. It was easy enough to fix and I've checked in into the Apache Flex 
develop branch.

I'm not sure  if that helps you with your Flash issue or not however.
                
> [Not injection][TLF only]The text display as multiline when paste multiline 
> text into single-line TLFTextField,
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-33544
>                 URL: https://issues.apache.org/jira/browse/FLEX-33544
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Runtime Shared Libraries
>    Affects Versions: Adobe Flex SDK 3.1 (Release)
>            Reporter: jingyuan
>         Attachments: TLF single line.fla
>
>
> Problem:
> The text display as multiline when paste multiline text into single-line 
> TLFTextField.
> Notes:
> 1. The issue occurs on IE, Firefox and Safari +Win&Mac
> 2. The issue doesn't reproduce on TextField single-line
> 3. The issue occurs on both vertical and horizontal of TLF class
> Method:
> 1. Install the latest FP build 11.7.700.193 on Win 7
> 2. Launch the "TLF single line.swf" in the attachment  (you can also create a 
> swf with flash CS and drag TLF control with property set to single line)
> 3. Press "Ctrl+A" to select all the text in the "TextField Mutiline" area 
> then "Ctrl+C"
> 4. Place cursor into the "TLF single line" area and "Ctrl + V" to paste the 
> text
> 5. Check
> Result:
> The text displayed as mutiline
> Expected:
> The text should displayed as single line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to