So my jquery (1.4.1) code is something like this:
$(document).ready(function () {
$("#Pattern").focus();
$("textarea").change(function () { Match(); });
...
var Match = function () {
...
};
})
Pattern is a textarea. And all works fine everywhere - except IE 8. And behavior of IE 8 is weird - it doesn't work sometimes for the first time and seems to work later. By not working I mean when I type something in textarea and lose focus - Match function is not called. I looked around but all I tried was in vain.
EDIT: solution
So, nothing worked and I had to do it by hand using .focusout event
var previousPattern = '';
$(document).ready(function () {
$("#Pattern").focus();
$("#Pattern").focusout(
function () {
if ($("#Pattern").val() != previousPattern) {
previousPattern = $("#Pattern").val();
Match();
}
});
...
}
And now it works as expected.