HTML input file selection event not firing upon selecting the same file
Set the value of the input to null on each onclick event. This will reset the input‘s value and trigger the onchange event even if the same path is selected. var input = document.getElementsByTagName(‘input’)[0]; input.onclick = function () { this.value = null; }; input.onchange = function () { console.log(this.value); }; <input type=”file” value=”C:\fakepath”> Note: It’s … Read more