0 Replies Latest reply on Sep 11, 2012 11:58 PM by LauriNaalisvaara

    TextInput focus problem

    LauriNaalisvaara

      Hi I have a TextInput component in my application and i have on keyup function so that the TextInput loses its focus after Enter key is pressed. Problem is when i click outside the flash application after pressing enter and then click again somewhere on the application the TextInput field gets the focus again even though it lost it when i hit the entery key. So instantly when flash application gets the focus from the browser it sets the focus back on the text input object (which already lost its focus). How do i get rid of this? Here is the function:

       

      function textInputKeyUpHandler(e : KeyBoardEvent) : void {

           if(e.keyCode == KeyBoard.ENTER) {

                stage.focus = null;

           }

      }