I met some questions about javascript in IE11; the code below is a simple demo:
<input type="file" id="test">
<script>
document.querySelector("#test").addEventListener("change", function() {
console.log("file changed");
});
</script>
when I click the input button, all browsers pop up the file selection window. when I picked file(s) and press "open" (or "confirm" or something else), I see "file changed" message in the console.
after that, when I use command like this below:
document.querySelector("#test").value = "";
chrome, firefox and IE10 do nothing, but IE11 shows "file changed"; so I want to know if this is a bug or just something I got wrong to make this happend. thanks. P.S. I have some way to resolve or circumvent the problem, I just want to know the reason.