I have a very basic file uploader. I upload a file, which triggers the change event (console.log). I navigate to a different page, then press the back button. The change event triggers again (the event is logged again to the console).
I am using Chrome. It doesn't happen with text inputs; only file. Anyone know why?
<input type="file" />
<script>
const input = document.querySelector("input[type=file]");
input.addEventListener("change", console.log, { once: true });
</script>