Stumbled across this today and not sure I understand what's going on.
I have a form on a page; if the page doesn't have a URL fragment I can submit the form to reload the page whether I've changed anything in the form or not.
However, if the page has a URL fragment, I can only submit the form if something in the form has changed from the page's query parameters; if nothing has changed in the form the browser won't let me submit it to reload the page
Fiddle Link: https://codesandbox.io/s/html-forms-forked-4v3zyx?file=/index.html
- In the browser window, enter abc into the input field and hit submit; the text should disappear from the input field as the form has submitted and the page has reloaded
- Update the URL in the browser to: https://4v3zyx.csb.app/?inp=abc and hit enter
- enter abc into the input field and hit submit; the text should disappear from the input field as again the form has submitted and the page has reloaded
- Update the URL in the browser to: https://4v3zyx.csb.app/?inp=abc#any-fragment-here and hit enter
- enter abc into the input field and hit submit; the text should NOTdisappear from the input field as whatever is going on has prevented the form from being submitted
- Change the text to anything else and hit submit, and the page should submit as it did in steps 1 and 3
I can't figure out why - I'm seeing this behaviour in edge, chrome, and firefox - anyone know what's going on?