Hi Mihai, I forgot about this. I’m not going to have time to look into this for at least a week or two.
Please email me a reminder to take a look in a couple of weeks… Harbs On Oct 20, 2016, at 11:29 AM, Mihai Chira <mihai.ch...@gmail.com> wrote: > If anyone with TLF knowledge wants to take a look at this, it would be > quite helpful. Some of the investigation work is already done, and > someone who understands what _should_ happen can probably spot the > problem quickly. Thank you! > > On 29 August 2016 at 15:26, Mihai Chira <mihai.ch...@gmail.com> wrote: >> Hi Harbs, just a quick reminder about this ticket, for when you have time. >> >> Many thanks! >> Mihai >> >> On 13 April 2016 at 12:54, Mihai Chira <mihai.ch...@gmail.com> wrote: >>> Actually this bug seems to occur when the empty span is *not* removed. >>> Thanks for taking a look! >>> >>> On 13 April 2016 at 12:53, Harbs <harbs.li...@gmail.com> wrote: >>>> I think TLF is more aggressive than it used to be in removing empty spans. >>>> >>>> I’ll try to look into this when I find the time. >>>> >>>> On Apr 13, 2016, at 1:22 PM, Mihai Chira <mihai.ch...@gmail.com> wrote: >>>> >>>>> Hey guys, I feel I've done as much as I can on this ticket to pave the >>>>> way for someone with more TLF knowledge to hopefully have an easy time >>>>> understanding and fixing it. Do any of you have time to take a look? >>>>> Many thanks! >>>>> >>>>> On 13 April 2016 at 11:50, Mihai Chira (JIRA) <j...@apache.org> wrote: >>>>>> >>>>>> [ >>>>>> https://issues.apache.org/jira/browse/FLEX-35078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15238824#comment-15238824 >>>>>> ] >>>>>> >>>>>> Mihai Chira edited comment on FLEX-35078 at 4/13/16 9:49 AM: >>>>>> ------------------------------------------------------------- >>>>>> >>>>>> * in {{TextFlowLine.makeSelectionBlocks()}} >>>>>> {{textLine.getAtomIndexAtCharIndex(27) == -1}} although >>>>>> {{textLine.rawTextLength == 37}} >>>>>> * after validation (see the *Workaround* in the ticket description) the >>>>>> text flow >>>>>> {noformat} >>>>>> <TextFlow whiteSpaceCollapse="preserve" version="3.0.0" >>>>>> xmlns="http://ns.adobe.com/textLayout/2008"><p><span >>>>>> fontSize="15"></span><span>The bug is in the function >>>>>> TextFlowLine.adjustEndElementForBidi</span></p></TextFlow> >>>>>> {noformat} is converted into {noformat} >>>>>> <TextFlow whiteSpaceCollapse="preserve" version="3.0.0" >>>>>> xmlns="http://ns.adobe.com/textLayout/2008"><p><span>The bug is in the >>>>>> function >>>>>> TextFlowLine.adjustEndElementForBidi</span></p></TextFlow>{noformat} >>>>>> (where the empty span is where the bullet text used to be) and the fatal >>>>>> isn't thrown. >>>>>> >>>>>> >>>>>> was (Author: evolverine): >>>>>> * in {{TextFlowLine.makeSelectionBlocks()}} >>>>>> {{textLine.getAtomIndexAtCharIndex(27) == -1}} although >>>>>> {{textLine.rawTextLength == 37}} >>>>>> * after validation (see the *Workaround* in the ticket description) the >>>>>> text flow >>>>>> {noformat} >>>>>> <TextFlow whiteSpaceCollapse="preserve" version="3.0.0" >>>>>> xmlns="http://ns.adobe.com/textLayout/2008"><p><span >>>>>> fontSize="15"></span><span>The bug is in the function >>>>>> TextFlowLine.adjustEndElementForBidi</span></p></TextFlow> >>>>>> {noformat} is converted into {noformat} >>>>>> <TextFlow whiteSpaceCollapse="preserve" version="3.0.0" >>>>>> xmlns="http://ns.adobe.com/textLayout/2008"><p><span>The bug is in the >>>>>> function >>>>>> TextFlowLine.adjustEndElementForBidi</span></p></TextFlow>{noformat} >>>>>> where the empty span is where the bullet text used to be. >>>>>> >>>>>>> Fatal when SelectionManager tries to reapply selection onto changed >>>>>>> textFlow >>>>>>> ---------------------------------------------------------------------------- >>>>>>> >>>>>>> Key: FLEX-35078 >>>>>>> URL: https://issues.apache.org/jira/browse/FLEX-35078 >>>>>>> Project: Apache Flex >>>>>>> Issue Type: Bug >>>>>>> Components: Spark: RichEditableText, TLF >>>>>>> Affects Versions: Apache Flex 4.15.0 >>>>>>> Reporter: Mihai Chira >>>>>>> Assignee: Mihai Chira >>>>>>> Fix For: Apache Flex 4.16.0 >>>>>>> >>>>>>> Attachments: Main.mxml >>>>>>> >>>>>>> >>>>>>> *Steps to reproduce*: >>>>>>> * run the attached mxml >>>>>>> * click on the "Bullets" button >>>>>>> *Expected results*: the bullet text is removed from the paragraph and >>>>>>> the RichEditableText is focused. >>>>>>> *Actual results*: the bullet text is removed, but when the focus moves >>>>>>> back to the RichEditableText component, the following fatal is thrown: >>>>>>> {noformat} >>>>>>> [Fault] exception, information=RangeError: Error #2006: The supplied >>>>>>> index is out of bounds. >>>>>>> at flash.text.engine::TextLine/getAtomBidiLevel() >>>>>>> at >>>>>>> flashx.textLayout.compose::TextFlowLine/adjustEndElementForBidi()[C:\Users\evolverine\Adobe >>>>>>> Flash Builder >>>>>>> 4.7\FLEX-33058\src\flashx\textLayout\compose\TextFlowLine.as:2499] >>>>>>> at >>>>>>> flashx.textLayout.compose::TextFlowLine/makeSelectionBlocks()[C:\Users\evolverine\Adobe >>>>>>> Flash Builder >>>>>>> 4.7\FLEX-33058\src\flashx\textLayout\compose\TextFlowLine.as:1812] >>>>>>> at >>>>>>> flashx.textLayout.compose::TextFlowLine/http://ns.adobe.com/textLayout/internal/2008::calculateSelectionBounds()[C:\Users\evolverine\Adobe >>>>>>> Flash Builder >>>>>>> 4.7\FLEX-33058\src\flashx\textLayout\compose\TextFlowLine.as:1517] >>>>>>> at >>>>>>> flashx.textLayout.compose::TextFlowLine/getSelectionShapesCacheEntry()[C:\Users\evolverine\Adobe >>>>>>> Flash Builder >>>>>>> 4.7\FLEX-33058\src\flashx\textLayout\compose\TextFlowLine.as:1428] >>>>>>> at >>>>>>> flashx.textLayout.compose::TextFlowLine/createSelectionShapes()[C:\Users\evolverine\Adobe >>>>>>> Flash Builder >>>>>>> 4.7\FLEX-33058\src\flashx\textLayout\compose\TextFlowLine.as:1664] >>>>>>> at >>>>>>> flashx.textLayout.compose::TextFlowLine/http://ns.adobe.com/textLayout/internal/2008::hiliteBlockSelection()[C:\Users\evolverine\Adobe >>>>>>> Flash Builder >>>>>>> 4.7\FLEX-33058\src\flashx\textLayout\compose\TextFlowLine.as:2196] >>>>>>> at >>>>>>> flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::addSelectionShapes()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\container\ContainerController.as:2920] >>>>>>> at >>>>>>> flashx.textLayout.edit::SelectionManager/addSelectionShapes()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\edit\SelectionManager.as:1240] >>>>>>> at >>>>>>> flashx.textLayout.edit::SelectionManager/refreshSelection()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\edit\SelectionManager.as:1272] >>>>>>> at >>>>>>> flashx.textLayout.edit::SelectionManager/http://ns.adobe.com/textLayout/internal/2008::setSelectionFormatState()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\edit\SelectionManager.as:896] >>>>>>> at >>>>>>> flashx.textLayout.edit::SelectionManager/focusInHandler()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\edit\SelectionManager.as:2279] >>>>>>> at >>>>>>> flashx.textLayout.container::ContainerController/focusInHandler()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\container\ContainerController.as:2452] >>>>>>> at >>>>>>> flashx.textLayout.container::TextContainerManager/focusInHandler()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\container\TextContainerManager.as:2089] >>>>>>> at >>>>>>> spark.components.supportClasses::RichEditableTextContainerManager/focusInHandler()[C:\Users\evolverine\workspace\flex-sdk\frameworks\projects\spark\src\spark\components\supportClasses\RichEditableTextContainerManager.as:642] >>>>>>> at >>>>>>> flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::requiredFocusInHandler()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\container\ContainerController.as:2470] >>>>>>> at flash.display::Stage/set focus() >>>>>>> at >>>>>>> mx.core::UIComponent/setFocus()[C:\Users\evolverine\workspace\flex-sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:10437] >>>>>>> at >>>>>>> spark.components::RichEditableText/setFocus()[C:\Users\evolverine\workspace\flex-sdk\frameworks\projects\spark\src\spark\components\RichEditableText.as:3122] >>>>>>> at Main/bulletList_clickHandler()[C:\Users\evolverine\Adobe Flash >>>>>>> Builder 4.7\FLEX-33058\src\Main.mxml:39] >>>>>>> at Main/__bulletsButton_click()[C:\Users\evolverine\Adobe Flash Builder >>>>>>> 4.7\FLEX-33058\src\Main.mxml:71] >>>>>>> {noformat} >>>>>>> *Workaround*: call {{display.validateNow();}} before >>>>>>> {{display.setFocus();}} >>>>>>> *Notes*: >>>>>>> * couldn't reproduce the bug with only one line; we seem to need the >>>>>>> text to wrap around the second line. >>>>>>> * couldn't reproduce the bug if the span representing the bullet text >>>>>>> wasn't set to an explicit font size (of any value). >>>>>>> * could reproduce the bug with many random (non-empty) strings for the >>>>>>> bullet text, including one space. >>>>>>> * could reproduce the bug when I set the fontWeight instead of the >>>>>>> fontSize on the bullet span. It seems that anything that will get the >>>>>>> bullet placed into a separate span rather than merged with the span >>>>>>> containing the main text will reproduce the bug. >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> This message was sent by Atlassian JIRA >>>>>> (v6.3.4#6332) >>>>