Hi gpi,

When the RichEditableText component loses focus it clears all undo steps by
default.  Therefore, in your demo when you click the "setStyle" button the
editable text loses focus and the undo steps are lost. This is the expected
behavior.

To prevent this from happening you need to set the "clearUndoOnFocusOut"
property to false for the RichEditableText component. Unfortunately, this
property is marked mx_internal so you access it you must include the
mx_internal namespace.

Hope this helps.

- Jake


On Fri, Jun 13, 2014 at 1:48 AM, gpi <grzegorz.pietrus...@inosa.no> wrote:

> Hi,
> during programming I found strange problem with UndoManager related to
> textFlow in RichEditableText. When I try to set some style for RET (by
> setStyle), all steps stored in UndoManager are reseting.
>
> Here is simple example online:
> http://op2.pl/undo/test.swf <http://op2.pl/undo/test.swf>
>
> When enter some text an click "Undo" - everything is ok, but when after
> enter text click on "Set Style" (ret.setStyle('backgroundColor',
> '#CC6699');) - Undo doesn't work.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/setStyle-destroy-UndoManager-tp6827.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Reply via email to