Flex:如何判断 TextArea 是否有闪烁的光标
有没有办法判断 Flex TextArea< /code>
有一个闪烁的光标? 一个指示是组件是否获得焦点:
focusManager.getFocus() == textArea
但是光标可能会闪烁但没有焦点。 我不确定相反是否可能(聚焦而不闪烁光标)。
编辑:这里的问题似乎是“组件级”焦点和“玩家级”焦点之间的区别(根据 FocusManager
文档)。 我还没有找到对后者或 API 的任何很好的解释。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
闪烁的光标是一种视觉指示,表明您现在可以在框中键入文本,因此它必须具有焦点。
也许可以破解一个页面,使 textArea 在删除其焦点的同时具有闪烁的光标,但这是错误的。 因此,在正常使用情况下,如果 textArea 具有焦点,它将有一个闪烁的光标,如果它有一个闪烁的光标,它将具有焦点。
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.