title: How to remove focus from control when window does not have focus?(otherwise it will be restored when window gains focus again)
body: <p>I need to remove focus from <code>TextInput</code> while <code>Adobe Air</code> window does not have focus. But I can't find <em>normal</em> way to do this.</p>
  
  <p>Here is a sample app:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                         xmlns:s="library://ns.adobe.com/flex/spark" 
                         xmlns:mx="library://ns.adobe.com/flex/mx"
  
                         &gt;
      &lt;fx:Script&gt;
          &lt;![CDATA[
              protected function onFocusIn(event:FocusEvent):void{
                  input.appendText('I');
              }
  
              protected function onFocusOut(event:FocusEvent):void{
                  input.appendText('o');
              //  input.focusManager.deactivate();
              //  stage.focus = null;  
              //  focusManager.setFocus(input2);
              //  stage.focus = stage; 
              }
  
          ]]&gt;
      &lt;/fx:Script&gt;
      &lt;s:VGroup&gt;      
          &lt;s:TextInput id="input" focusIn="onFocusIn(event)" focusOut="onFocusOut(event)" /&gt;
          &lt;s:TextInput id="input2" /&gt; 
      &lt;/s:VGroup&gt;
  </code></pre>
  
  <p></p>
  
  <ol>
  <li><p><code>stage.focus = null</code> does not work - <code>stage.focus</code> is already <code>null</code> when window does not have focus, so it does not work.</p></li>
  <li><p><code>input.focusManager.deativate()</code> does the trick, but it seems that this manager is used for other controls, so this is not a good option. It is said in the documentation that</p>
  
  <blockquote>
    <p>The SystemManager activates and deactivates a FocusManager if more
    than one IFocusManagerContainer is visible at the same time.</p>
  </blockquote>
  
  <p>but in this sample app I have two TextInputs and when I deactivate focusManager for first one, second one does not restore focus on alt-tab any more.</p></li>
  <li><p>I can set focus to something else, but creating special 'dummy' input is some kind of monkey patch, and I prefer to avoid using it until it is inescapable.</p></li>
  <li><p>Setting <code>stage.focus</code> to some parent of TextInput does not have any effect either.</p>
  
  <p><strong>So, do you know any better way to remove focus from component while window does not have focus?</strong></p></li>
  </ol>