1. #1
    Sencha User
    Join Date
    Mar 2010
    Location
    Colorado, USA
    Posts
    8
    Vote Rating
    0
    danpres14 is on a distinguished road

      0  

    Default Unanswered: Can I tell when a browser has filled in autocomplete fields

    Unanswered: Can I tell when a browser has filled in autocomplete fields


    I want to hide the mask on a form only after the browser has filled in a couple auto-complete fields. In this case, the form will be shown when the page loads, although it would be good to have this functionality when I add a form to a panel after the user has done some action (edit preferences for example). I have been using the controller's onLaunch template method for the initial page load, however, this does not seem reliable. It looks like the browser (Chrome/Firefox) will sometimes apply the saved fields prior to the onLaunch function and sometimes they are applied after this function is called by the framework.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Can you check the value of the fields using a listener for afterrender?

    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Location
    Colorado, USA
    Posts
    8
    Vote Rating
    0
    danpres14 is on a distinguished road

      0  

    Default


    Hi Scott,

    I had previously tried using afterrender and that seems somewhat unreliable. From what I can tell, each browser behaves slightly differently but there is some sort of race condition where the afterrender code can be executed before the browser has filled the autocomplete values into the fields.

    In my last set of testing, the code works perfectly if I user a setTimeout and call the function a short time (25 msec) after the afterrender function gets invoked. When I place that same function call in the afterrender call, it works about 15% to 20% of the time. My concern is that the 25 msec delay may work on my machine, but I cannot guarantee this to work on less powerful or heavily utilized client machines.

Thread Participants: 1

Tags for this Thread