Quantcast
Channel: Adobe Community : Popular Discussions - Using Flash Builder
Viewing all articles
Browse latest Browse all 70427

TextInput focus problem

$
0
0

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;

     }

}


Viewing all articles
Browse latest Browse all 70427

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>