W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] [Web Forms 2.0] 2.3. Extensions to the select element - comment & proposal

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 29 Oct 2008 07:51:17 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0810290749570.1237@hixie.dreamhostps.com>
On Mon, 27 Aug 2007, Garrett Smith wrote:
> Currently there is a problem in at least Firefox, and I can't remember 
> about IE. If no OPTION has selected attribute, then Firefox will select 
> the first option in the list. If the first option is selected, it's 
> selected attribute will be true and the defaultSelected will be false. 
> This is because defaultSelected is required to return the value of the 
> HTML selected attribute.
> The negative result this has is that it causes the form to appear dirty.

To work around this, manually mark the first element as selected.

I think it isn't a bug that it marks the form as dirty (as it were); the 
data that the server sent is that nothing was selected, yet the client 
would submit a value. This is a difference and it is right to act as if it 
is a difference, IMHO.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 29 October 2008 00:51:17 UTC

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