IE11 calls onInput handler after creating input with diacritic value (elements created by jQuery)

I am creating jquery input and registering an Input handler on it.

$('body').append($('<input id="input1" class="test-input" type="text" value="X ล™ "/>'));
$('.test-input').on('input', function(){
    console.log('called onInput: ', $(this).attr('id'));
});    

      

See http://jsfiddle.net/1cmo1yko/13/ . If the input value is accented , IE11 calls the onInput handler. If there is no diacritic or if it is in the antoher browser (IE9, Chrome, Firefox), the handler is not called.

This is mistake? (I think that it is). If this is a bug, is it in jquery or IE11?

Thank.

+3


source to share


1 answer


Okay, to answer your question: this seems to be a bug in IE, since you can reproduce the same behavior in vanilla JS:

<input id="input1" class="test-input" type="text" value="X ล™ "/>

document.getElementById("input1").addEventListener('input', function() {
    console.log("Triggered!");
});

      



http://jsfiddle.net/1cmo1yko/16/

+1


source







All Articles