views:

972

answers:

1

Is there a way to tell if a Flex TextArea has a blinking cursor? One indication is if the component is focused:

 focusManager.getFocus() == textArea

But it's possible to have a blinking cursor without having the focus. I'm not sure if the converse is possible (focus without blinking cursor).

Edit: The rub here appears to be a distinction between "component-level" focus and "player-level" focus (per the FocusManager docs). I haven't yet found any great explanation of the latter or APIs to it.

+2  A: 

The blinking cursor is a visual indication that you can now type text into the box and as such it must have focus. It may be possible to hack a page to make the textArea have a blinking cursor while removing its focus but that would be wrong. So under normal usage if the textArea has focus it will have a blinking cursor and if it has a blinking cursor it will have focus.

kenneth
Seems reasonable, but if `focusEnabled` is set to false, the `TextArea` still accepts focus (focus ring, blinking cursor) while the focus manager reports a current focus of `null`.
Michael Brewer-Davis