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

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

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 23 Sep 2011 18:52:31 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1109231849570.16440@ps20323.dreamhostps.com>
On Fri, 23 Sep 2011, Kaustubh Atrawalkar wrote:
>
> There is an issue regarding form submit button which is little unclear 
> from the specs [...]
>
> 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.

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.

HTH.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 23 September 2011 11:52:31 UTC

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