W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] HTMLForms: Implicit Submission with {display:none} button

From: Kaustubh Atrawalkar <kaustubh@motorola.com>
Date: Sat, 24 Sep 2011 10:40:20 +0530
Message-ID: <CANw-Mg9tfXMSOq_4xWX1tRasX=e67RRN6xZPbFmEs4u6Xc79tg@mail.gmail.com>
> >
> > If the form has submit button with display property as none, will that
> > form should be implicitly submitted on pressing enter key? This works in
> > Opera & Firefox but does not work in IE & Safari as of now. What is the
> > expected behavior for this?
> The strict answer is that it's up to the browsers; the spec allows
> browsers to do whatever they think is appropriate per their platform's
> conventions. So both behaviours are compliant.
> But then this might result in website compliance issue. A website having
username, password field with hidden submit button expecting to login on
enter key using forms implicit submission will work on FF & Opera but may
not work on IE & Safari.

> The guidelines in the spec do not say anything about the behaviour being
> different for elements that are display:none or otherwise hidden, though,
> so I don't see any reason to consider the visibility of a button in making
> the decision as to which button is the default.
> Second to your opinion, on the last line of the specs paragraph it says -
"If the form has no submit button, then the implicit submission mechanism
must just submit the form element from the form element itself."

- Kaustubh
Received on Friday, 23 September 2011 22:10:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:36 UTC