Here's a test case to make your life easier. Place your cursor after any of the 
line breaks and hit the delete key on Mac (which I think is the backspace key 
on Windows).

It works correctly in 4.10.0, but does not work correctly in the develop branch 
code.

<?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"
                           width="400" minWidth="955" minHeight="600" 
creationComplete="onComplete()">
        <fx:Script>
                <![CDATA[
                        import flashx.textLayout.edit.EditManager;
                        import flashx.textLayout.elements.ListElement;
                        import flashx.textLayout.elements.ListItemElement;
                        import flashx.textLayout.elements.ParagraphElement;
                        import flashx.textLayout.elements.SpanElement;
                        import flashx.textLayout.elements.TextFlow;
                        import flashx.textLayout.formats.ListMarkerFormat;
                        import flashx.textLayout.formats.ListStylePosition;
                        import flashx.textLayout.formats.ListStyleType;
                        import flashx.undo.UndoManager;
                        [Bindable]private var textFlow:TextFlow;
                        
                        private function onComplete():void{
                                var para:ParagraphElement;
                                var span:SpanElement;
                                var i:int;
                                textFlow =  new TextFlow();
                                textFlow.interactionManager = new 
EditManager(new UndoManager());
                                textFlow.tabStops = "s12 s72";
                                textFlow.paragraphSpaceAfter = 16;
                                para = new ParagraphElement();
                                span = new SpanElement();
                                span.fontSize = 16;
                                span.fontWeight = "bold";
                                span.text = "Here's a paragraph with a line 
return at the middle.\u2028This is a new line.";
                                para.addChild(span);
                                textFlow.addChild(para);
                                para = new ParagraphElement();
                                span = new SpanElement();
                                span.fontWeight = "bold";
                                span.text = "Here's a paragraph with a line 
return at the end\u2028";
                                para.addChild(span);
                                textFlow.addChild(para);
                                para = new ParagraphElement();
                                span = new SpanElement();
                                span.fontWeight = "bold";
                                span.text = "and here's another\u000A";
                                para.addChild(span);
                                textFlow.addChild(para);
                                var list:ListElement = new ListElement();
                                list.listAutoPadding = 0;
                                
                                para = new ParagraphElement();
                                para.textIndent = -12;
                                para.paragraphStartIndent = 12;
                                span = new SpanElement();
                                span.text = "Lorem ipsum dolor sit amet, 
consectetur adipiscing elit.\u2028Aenean ultricies id nisl sit amet 
sollicitudin.";
                                para.addChild(span);
                                var item:ListItemElement = new 
ListItemElement();
                                item.listStylePosition = 
ListStylePosition.INSIDE;
                                item.listStyleType = ListStyleType.DISC;
                                var marker:ListMarkerFormat = new 
ListMarkerFormat();
                                marker.afterContent = "\t";
                                item.listMarkerFormat = marker;
                                item.addChild(para);
                                list.addChild(item);
                                
                                textFlow.addChild(list);
                        }
                ]]>
        </fx:Script>
        <s:RichEditableText verticalCenter="0" width="400" 
textFlow="{textFlow}"/>
</s:Application>

On Sep 2, 2013, at 7:34 PM, Harbs wrote:

> Okay. Here's the deal:
> 
> If your line return has text after it, the line return acts like any other 
> character, but if you put your cursor at the end of the paragraph and 
> delete(backspace) the text until you get to the line return, the line return 
> will not get deleted.
> 
> You can see the behavior in the test app below like I wrote.
> 
> HTH,
> Harbs
> 
> On Sep 2, 2013, at 6:13 PM, Harbs wrote:
> 
>> Never mind. I'm not seeing the problem in that test app.
>> 
>> I'll have to figure out how to create a test case later…
>> 
>> On Sep 2, 2013, at 6:04 PM, Harbs wrote:
>> 
>>> Just pull my test app off here 
>>> https://issues.apache.org/jira/browse/FLEX-33693
>>> 
>>> And add in \u2028 somewhere to create a line break. (I think \u000A will do 
>>> the same.)
>>> 
>>> On Sep 2, 2013, at 5:47 PM, Alex Harui wrote:
>>> 
>>>> Yup, definitely possible.
>>>> 
>>>> If you can make a small test case I will take a look.  For now, set the
>>>> ContainerController flag to false to get back to old behavior.
>>>> 
>>>> -Alex
>>>> 
>>>> On 9/2/13 7:40 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>>>> 
>>>>> Alex,
>>>>> 
>>>>> Is it possible that your latest changes broke the cursor movement for
>>>>> soft line breaks?
>>>>> 
>>>>> Here's the behavior I'm seeing in 4.10.0:
>>>>> 
>>>>> With a line break (no new paragraph), and the cursor at the beginning of
>>>>> the new line I'm seeing the following:
>>>>> A backspace will delete the line break
>>>>> Left arrow will move the cursor to the previous line.
>>>>> 
>>>>> In the latest development build:
>>>>> Neither backspace or back arrow do anything.
>>>>> 
>>>>> It looks like this:
>>>>>                                   var beginPrevious:int =
>>>>> NavigationUtil.previousAtomPosition(textFlow,
>>>>> operationState.absoluteStart);
>>>>> returns the same value as the operationState.absoluteStart when the
>>>>> cursor is right before a line return.
>>>>> 
>>>>> Harbs
>>>>> 
>>>>> On Sep 1, 2013, at 7:52 AM, Alex Harui wrote:
>>>>> 
>>>>>> OK, pushed my changes.  Have fun.
>>>>>> 
>>>>>> On 8/31/13 9:40 PM, "Alex Harui" <aha...@adobe.com> wrote:
>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On 8/31/13 9:31 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>>>>>>> 
>>>>>>>> Do you mean the user would have to manually set back the version
>>>>>>>> number
>>>>>>>> when they compile?
>>>>>>>> 
>>>>>>>> That does sound like a bitter pill to swallow. Setting internal
>>>>>>>> variables
>>>>>>>> sounds much more palatable to me.
>>>>>>>> 
>>>>>>>> I'll create an internal bool handleShiftAsSoftReturn which will
>>>>>>>> default
>>>>>>>> to true.
>>>>>>>> 
>>>>>>>> Makes sense?
>>>>>>> Yep, that's what I would do.
>>>>>>> 
>>>>>>> 
>>>>>>> Let me check in my most recent changes to support discretionary hyphens
>>>>>>> before you get started so we don't get merge conflicts.
>>>>>>> 
>>>>>>> -Alex
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 

Reply via email to