Copy link to clipboard
Copied
How to remove focus from
1. The input field if the user clicks outside the input field.
Copy link to clipboard
Copied
While it depends partly on what is outside the textfield, one way would be to add an event listener to the stage and then check what was clicked. If it happened to be the stage, set the focus onto the stage.
stage.addEventListener(MouseEvent.MOUSE_UP, focusStage);
function focusStage(evt:MouseEvent):void {
if(evt.target == stage){
stage.focus = stage;
}
}
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more