Web developer and long-time Opera user Brian Huisman has discovered one of those small and sometimes annoying inconsistencies in the web platform: a hidden input has no default value, and is thus not reset to its original value if you do form.reset(). For some reason, Gecko/Firefox, WebKit/Safari/Chrome and Opera all implement this quirky behaviour. If any reader knows why, a small history lesson would be pretty interesting!
However, in IE hidden inputs are consistent with other types of input, and are reset with the rest of the form. This seems like the behaviour you would expect when calling form.reset() or clicking a "reset" button, no?
I assume most people would agree that a consistent behaviour for both input type=text and input type=hidden is desirable. The major question is whether browser vendors can safely stop special-casing hidden inputs. Ian Hickson, the HTML5 editor, leaves it to the browser vendors and tells Brian to go convince them first. Obviously, I'm wearing a browser vendor quality assurance hat, so who am I to argue against that? 🙂
It would still be nice to be consistent. If only we somehow knew that we would not break existing sites by changing this..
From left to right: Firefox, Chrome, IE8, Opera without User JS running, Opera with User JS running.
Let us know in the comments what behaviour you find better, and whether you find any broken sites!