1 Reply Latest reply on Aug 8, 2011 10:15 AM by Flex harUI

    Possible bug identified - Textarea + UndoManager + ContentBackground

    cmk15231

      So I've been struggling with creating my own text area editor for weeks now because of the UndoManager.  Long story short, every time I lost focus (actually, it was more like the "focus in" event), the undomanager for my textarea would lose its undo/redo capabability... even though the undomanger's canRedo() and canUndo() functions said I could.

       

      One of my first tests in order to try and figure out a fix was to create a whole new project with almost nothing but a single textarea. That worked.  I was able to undo/redo after focusing in/out of the area. Therefore, I was puzzled as to why my orginal was not working.

       

      Well after the mundane task of moving my textarea all over with it working sometimes in some places and not in other places, I figured out that having my spark textarea (<s:textarea>) component inside a spark HGroup or VGroup with a contentBackgroundAlpha of 0.0 or other values, it would prevent the textarea's undomanger from working properly.  Values of 1.0 or other "higher" (ie 0.9) values fixed the issue.  Therefore, I've concluded that this value somehow prevents the undomanger from working correctly.

       

      I just thought I'd post to help others out and/or to find out if I'm doing something wrong.