Skip navigation
andrewtom
Currently Being Moderated

How to prevent focusing the last element on application focus?

Feb 16, 2014 1:43 AM

Tags: #4.5 #actionscript_3.0 #flex4.5

I have the following scenario:

  1. Focus an element(RichEditableText) by clicking it
  2. On a certain event, I set stage.focus = null thus the element loses focus
  3. Minimize the application and then reopen it
  4. The last element that was focused, gains focus back even though at minimization there was no focused element

 

Why does it happen and how can I prevent it?

 

I know a solution is to set the focusEnable to false but this is not what I want.

 
Replies
  • Currently Being Moderated
    Feb 18, 2014 9:04 AM   in reply to andrewtom

    ?I think this will be tricky unless you can designate some other element to receive focus.

     

     

    You may need to reconsider why you need to set stage.focus = null in step 2.

     

     

    -Alex

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points