W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2012

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

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 29 Jun 2012 21:24:12 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>, Dimitri Glazkov <dglazkov@chromium.org>, Glenn Maynard <glenn@zewt.org>, Rob Crowther <robertc@boogdesign.com>
Message-ID: <Pine.LNX.4.64.1206292119380.30734@ps20323.dreamhostps.com>
Cc: "whatwg@whatwg.org" <whatwg@whatwg.org>

On Tue, 21 Feb 2012, Boris Zbarsky wrote:
> On 2/21/12 10:47 PM, Dimitri Glazkov wrote:
> > I made WebKit match this behavior a couple of years ago: 
> > https://bugs.webkit.org/show_bug.cgi?id=9756
> 
> Ah, interesting.  Some of the links in that bug indicate that people are 
> in fact depending on this behavior....

I've tried to define this in the spec. It's a bit esoteric, but...

Let me know if it's not quite right. I wasn't sure exactly what weird 
things to test. I mostly relied on WebKit's (specifically Chrome's) 
behaviour here since they were apparently the ones most recently affected 
by real compat reasons to implement something here so maybe they are the 
closest to what the Web today actually needs (?).


On Tue, 3 Apr 2012, Boris Zbarsky wrote:
> On 4/3/12 5:14 PM, Glenn Maynard wrote:
> > Ten years later it's still giving me headaches, when I try to do a 
> > trivial two-input login form without a browser submit button, and find 
> > that every obvious way of hiding the submit button breaks implicit 
> > submit in one browser or another.  Do I really need to stick the 
> > submit button in an overflow: hidden, 0x0 div?  I know I found a less 
> > ugly workaround for this the last time I hit this...
> 
> Well, the fact that display:none makes it not submit is clearly a 
> browser bug in the browsers it happens in.

Indeed.


On Tue, 21 Feb 2012, Glenn Maynard wrote:
>
> I don't think the existence of implicit submit should depend on platform 
> conventions, though, for interop on forms without visible submit 
> buttons. The form implicit submit takes is a platform convention, but it 
> should be required to exist in some form or another.

User agents aren't actually required to let users input anything, so it 
doesn't make much sense to require submission be possible...


On Thu, 24 May 2012, Rob Crowther wrote:
> On 22/02/12 00:35, Ian Hickson wrote:
> > I've changed the spec to be clearer that CSS cannot be taken into 
> > account when determining the default. The default button is just 
> > always the first submit button in the form.
> 
> What about the situation where there isn't a button?  Implicit 
> submission still seems to happen on forms which have just a single 
> element, for example:
> 
> http://www.boogdesign.com/examples/forms2/test-validate-1.html 
> http://www.boogdesign.com/examples/forms2/test-validate-2.html
> 
> These both trigger the form validation algorithm in Firefox, Opera & 
> Chrome if you just hit return.  This form with two inputs doesn't 
> trigger implicit submission:
> 
> http://www.boogdesign.com/examples/forms2/test-validate-3.html
> 
> But add a submit button and it does:
> 
> http://www.boogdesign.com/examples/forms2/test-validate-4.html
> 
> Because in 4.10.22.2 everything hinges on the 'default button' this 
> behaviour doesn't seem to be covered.  Is this intentional?

I've updated the spec to hopefully better match this, as noted above.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 29 June 2012 21:24:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:14 UTC