# Removing focus from an input text field

**URL:** <https://forum.kirupa.com/t/removing-focus-from-an-input-text-field/301230>\
**Category:** flash\
**Created:** [December 5, 2009, 4:17pm UTC](https://forum.kirupa.com/t/removing-focus-from-an-input-text-field/301230 "2009-12-05T16:17:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tahereh](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@Tahereh](https://forum.kirupa.com/u/Tahereh)\
**Post date:** [December 5, 2009, 4:17pm UTC](https://forum.kirupa.com/t/removing-focus-from-an-input-text-field/301230/1 "2009-12-05T16:17:23Z")

</div>

Hi all!  
I have a textfield and a button component.The problem is when the textfield is focused and i click anywhere on the stage it remains focused and no focusout event occurs. I know that it’s because component classes implement IFocusManager(Component) interface and the TextField class does not .I do not want to create a new instance of FocusManager class or implement the IFocusManager interface in a custom class. Is there any way to disable the focusmanager ? The deactivate method does not seem to work in as3!:puzzled:

```auto

import fl.managers.FocusManager
 
var fm:FocusManager=new FocusManager(this)
fm.deactivate()
 
field.addEventListener(FocusEvent.FOCUS_IN,focusHandler)
field.addEventListener(FocusEvent.FOCUS_OUT,focusHandler)
field.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE,focusHandler)
field.addEventListener(FocusEvent.KEY_FOCUS_CHANGE,focusHandler)
 
 
function focusHandler(e:FocusEvent):void{
 trace("
"+"type : "+e.type)
 trace("target : "+e.target)
 trace("relatedObject : "+e.relatedObject)
 trace(" __________________________________________")
  }
 

```

Thanx in advance.
