TextInput component in how to get the current cursor position? Because I want to record a loss of focus on the TextInput location dynamically add text.
The TextInput is just a wrapper and skin for a RitchEditableText, which can be accessed through textDisplay. From there, you can use textDisplay.selectionActivePosition and textDisplay.selectionAnchorPosition. These will contain the same values unless the user has a range of text selected.
Thank you for your answers, Oh, textDisplay What is it? Never used.
textDisplay:RichEditableText is a Skin Part of the spark TextInput class, and is what's actually doing all the text editing/rendering work. If you need to preform any advanced text operations, they need to go through the textDisplay property. Since it is a Skin Part, you need to make sure it's not null before you do anything on it.
Fixed Typo: It's the textDisplay property, not textInput