[ https://issues.apache.org/jira/browse/FLEX-20864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485601#comment-13485601 ]
Ad Miel commented on FLEX-20864: -------------------------------- I use Flex 4.6.0.23201 and I get still this issue with setFormatOfRange(textLayoutFormat), but there is a workaround: when I use IEditManager( editor.textFlow.interactionManager ).applyLeafFormat(tf) it is OK Also remember to set import mx.core.mx_internal; this.mx_internal::clearUndoOnFocusOut = false; because these operations causes to loose focus and then undo stack is broken (by design) > Break stack undo in RichEditableText when I make one or more operations > ApplyFormatOperation sequentially > --------------------------------------------------------------------------------------------------------- > > Key: FLEX-20864 > URL: https://issues.apache.org/jira/browse/FLEX-20864 > Project: Apache Flex > Issue Type: Bug > Components: Spark: RichEditableText > Affects Versions: Adobe Flex SDK 4.1 (Release) > Environment: Affected OS(s): Windows > Affected OS(s): Windows XP > Browser: Firefox 3.x > Language Found: English > Reporter: Adobe JIRA > Assignee: Adobe JIRA > > I found a bug with undo when I make one or more operations > ApplyFormatOperation sequentially. this breaks the stack of undo, not undoing > the other operations when press control-z, or call undo(); > <s:RichEditableText width="500" height="500" content="Lorem ipsum dolor sit > amet" id="rt" /> > function applyFormat(){ > var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat(); > textLayoutFormat.fontSize = 20; > textLayoutFormat.color = 0xFF0000; > rt.setFormatOfRange(textLayoutFormat); > } > OR > function applyFormat(){ > var cf:TextLayoutFormat = new TextLayoutFormat(); > cf.fontSize = 20; > IEditManager( rt.textFlow.interactionManager ).applyLeafFormat(cf); > } > Steps to reproduce: > 1. applyFormat(); > //Then after I select another part of the text and call again > 2. applyFormat(); //or more > 3 Here the bug happens > > Actual Results: > > Broken stak undo > Expected Results: > > Undo last operation ApplyFormatOperation > > Workaround (if any): -- 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