Search code examples
facebookapache-flexfocustextinput

How to return the focus to a textInput in a browser


I need to focus a text input into the Facebook login popup. I am using a virtual keyboard to simulate a physical one, but when I click a key, the text input lose focus and the letter is not written into the field.

How could I maintain the focus in the text input?


Solution

  • I finally came to another solution... Using getElementsByTagName('theElementID'), I could get a reference to the textInputs in the browser, and I could modify its attributes...

    For example,

    emailStringObject =this.html.htmlLoader.window.document.getElementById('email');
    emailStringObject.value="example@correo.com"