I am using iOS (havent tested on android) and the skinClass="spark.skins.mobile.TextInputSkin" and am having an issue when I go to enter text from the soft keyboard. When the text input is empty and I press on a key on the keyboard, that letter enters the text input but it gets highlighted right away by iOS and then the second letter I type overwrites the first. It just happens for the first letter. I tested the same setup on AIR 3.1 and it does not happen so I am thinking its a bug with 3.2
I have the same Problem: in some cases we have in TextInputs the bahaviour that every time I input a text the whole text in Textinput ist selected. This does only happen when I compile with Air 3.2 - if I use Air 3.1 everything works like expected. This does not happen in TextAreas and some other TextInputs in the same Application.
In case that the part of the Screen is scrolling where the TextInputs are I changed the skin to: spark.skins.mobile.TextInputSkin
SDK: Air 3.2 / Flex 4.6 (combined)
compiled for iOS only, tested on iPad 2, iOS 5.1
using the e-skimo-lib for skinning (www.e-skimo.com) -> the Eskimo-Skin has been recompiled with the same SDK.
A little Update: seems like this has to do with listening on the "change" event - if I replace my listener to compute changes in TextInput control to the focusOut-event it seems to work - this really seems to be a bug in Air 3.2 sdk
protected function testTextInput_changeHandler(event:TextOperationEvent):void
// do something
protected function testTextInput_focusOutHandler(event:FocusEvent):void
// do the same
// did cause the problem:
// works for me
I have the same issue in the new 3.3 beta version. It doesn't seem like anyone is fixing it. This is definitely an issue with the Air 3.2 + compiler. Not ideal is you need the stage3D functionality on mobile.
The problem is somewhere in SkinnableTextBase. When textDisplay_changeHandler(event:Event) is called, invalidateSkinState() is what's causing the problem. If you set the skin's state to nothing (""), it works:
skin.currentState = "";
The problem is that your theme doesn't update properly.
Now is you set "showPromptWhenFocused" to false in your CSS, the problem doesn't happen. Only side effect is the prompt disapear if you have the textInput selected.
This is a complete hack, but it has made it possible to ship Air code on iOS with this issue.
We have created a control based on TextInput to use throughout our program that has a change event. In this change event we do something like the following:
if (this.text.length == 1 && flash.system.Capabilities.version.substr(0,3).toUpperCase() == "IOS")
this.insertText(this.text); //This does not fire the change event.
So, if the user presses a key, and there is only 1 key, that key will be doubled. This is not perceptible, so the selected text is immediately cleared with the same text. All characters added after the first work correctly.
Note that all of our TextInputs have a Prompt, so if scoregrid is correct, then this code should be changed to also check for Prompt text.
I don't know if this ever was solved for you, but my experience with similar problems is simply that iOS is too stupid -not- to shove a 'clear field' icon into the layout w/o resizing the component. I automatically make certain to add 50px to the width just to be extra certain the blasted thing doesn't obfuscate my text. Very very stupid thing to force people to do and there seems to be no programming logic as part of the component or mobile skin that lets you disable the icon or tell the component to recalculate the width automatically. If it's there, dragging through documentation and searching StackOverflow and the Adobe forums never exposed it to me.