I am coding a login screen with 3 TextInput controls. To make it a smoother experience for the user, I was capturing the .ENTER event of the keyboard to change focus to the next textInput. This part works fine.
Where there is a problem is trying to clear focus. Once the user types in the password (last field), I was calling txtPassword.clearFocus(), However focus would jump back to the previous textInput for email and the keyboard stays up.
I cleared the enter handler for the txtPassword control, but even with an empty handler, I am getting the same results. The only way I could keep it from toggling back to the previous control was to remove all .setFocus() calls.
My 3 Textinputs are defined in an mxml view file. The enter property is pointed to the corresponding handler:
// Actionscript function signature
private function passHandler():void ...
// MXML control tag
<f:TextInput id="txtPassword" event="passHandler()" />
Let me know what other data/info you might need to replicate.