Skip navigation
andrewtom
Currently Being Moderated

Managing multiple TextInputs

Feb 10, 2014 12:06 PM

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

I am pretty new to AS3 and I'd like to learn from the more experienced ones how to do it right. The problem I have is: having two text inputs, having the ability to change the focus from one to another and the most important one, make the input lose focus on click outside.

The problems I faced here are:

  1. When I click outside text inputs, it does not loses focus
  2. If I focus in a text input, minimize browser and come back, it auto refocuses the last element.

How do you see this process implemented and what could I do to solve the problems I face?

 
Replies
  • Currently Being Moderated
    Feb 10, 2014 6:17 PM   in reply to andrewtom

    If you are using Flex components, they are designed to make sure something has focus all of the time.  The behavior is more like Windows desktop apps than the way browsers behave.

     

    Why do you not want something to have focus at all times?

     

    -Alex

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2014 9:18 AM   in reply to andrewtom

    How does a user with accessibility issues use the keyboard to achieve the same functionality?  Are you showing the panel on focusIn or on a click event?

     

    -Alex

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2014 1:23 PM   in reply to andrewtom

    Is there anything focusable in the Panel?  If not, you could have the panel go away on any click.

     

    -Alex

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 13, 2014 9:31 AM   in reply to andrewtom

    No, just Panel.visible=false.  Leave the focus in the TextInput.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 13, 2014 10:47 AM   in reply to andrewtom

    Well, I was thinking of tooltips and callouts.  I think they stay up, go away after a while and the main control does not lose focus.  And I think that will be easier to implement vs fighting with the FocusManager.

     

    -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