Skip to content Skip to sidebar Skip to footer

JQuery Blur() Or Focusout() Not Firing In Internet Explorer

So I have this form and I would like to do some stuff when the inputs loose focus. This is the code I have and it's working like a champ in every browser except Internet Explorer.

Solution 1:

Did you try using focusout? http://api.jquery.com/focusout/

$("#comentario").focusout(function() {
    setTimeout(function() {
    var whatFocus = document.activeElement.tagName;

    if(whatFocus === "BODY")
    {
        focus = 0;
        //bla bla bla
    }
    }, 2);
});

Solution 2:

Oky… After hours trying every idea, even the the most strange ones, with no luck, i asked my gf for her computer and so i tried it there and all worked like a charm… :/ Pretty weird…

I just had to add a "DIV" part to the if conditional block to make the code inside it to work in IE9 and bellow, but the "focusout" thingy worked on the other computer with no issues.

I'm guessing my IE installation has some problems. Can't see any other explanation.

Anyway, thanks for all the help guys!


Post a Comment for "JQuery Blur() Or Focusout() Not Firing In Internet Explorer"