javascript - HTML Input has focus, but I can't edit it after using .val() -


so here problem.
have facebook page tab app. in there form text inputs , button "facebook login".
when user clicks button jquery fills in form user data received facebook graph. form managed js formly , jquery.
if user fills info manually there no problem, if uses "facebook login" can't edit inputs until iframe losses focus , gain again.
problem persists in firefox, chrome , ie works charm.

    function login(vpis) {         fb.login(function(response) {             if (response.authresponse) {                     console.log("welcome! fetching information.... ");                     fb.api("/me", function(response) {                         if(vpis)                         {                             $("#mail")[0].value = response.email;                             $("#mail2")[0].value = response.email;                             $("#name")[0].value = response.first_name;                             $("#surname")[0].value = response.last_name;                             $("#birthyear")[0].value = response.birthday.substring(6);                             //blur();                             mywindow=window.open("","","width=10,height=10");                             mywindow.close();                             //$("#tel").focus();                         }             } else {                     console.log("user cancelled login or did not authorize.");             }         }, {scope: "email,user_birthday,user_likes"}); } 

link formly.js http://fb.3art.si/rubrike/js/formly.js

here function fill in form. tried use lame tweak, lose focus, there problem when firefox blocks it.


any highly apriciated, , sorry bad english. have scaned google answer, not find it...


Comments