CodexBloom - Programming Q&A Platform

HTML `input` field not retaining value on form reset with Edge 18

👀 Views: 11 đŸ’Ŧ Answers: 1 📅 Created: 2025-08-28
html microsoft-edge form-reset HTML

I've tried everything I can think of but I keep running into I keep running into After trying multiple solutions online, I still can't figure this out... I am experiencing an scenario where an HTML `input` field does not retain its value after the form is reset in Microsoft Edge 18. The form is meant to capture user inputs, and after clicking the reset button, I expect all fields to clear. However, the `input` field that uses a `value` attribute does not reset to an empty string as intended. Here is the HTML code I am working with: ```html <form id="myForm"> <input type="text" name="username" value="JohnDoe" /> <input type="submit" value="Submit" /> <input type="reset" value="Reset" /> </form> ``` I have checked this behavior across different browsers, and it seems to work perfectly on Chrome and Firefox, where the input gets cleared as expected. However, on Edge 18, after hitting the reset button, the input still shows "JohnDoe". I also tried removing the `value` attribute altogether, and while that clears the input upon reset, I need to have a default value set for the initial load. I looked into the `reset` event but couldn't find a reliable way to programmatically clear the input in Edge. Has anyone encountered this scenario? Is there a workaround or best practice to ensure the input field resets correctly across all browsers? For context: I'm using Html on Windows. Any help would be greatly appreciated! I recently upgraded to Html stable.