W3C home > Mailing lists > Public > www-html@w3.org > August 2005

Re: Error in HTML 4.01 specification of 'onchange' event

From: David Woolley <david@djwhome.demon.co.uk>
Date: Wed, 3 Aug 2005 22:54:39 +0100 (BST)
Message-Id: <200508032154.j73LsdO00904@djwhome.demon.co.uk>
To: www-html@w3.org

> To the people who are w3c members and know about this
> specification, could you please take a moment to
> explain why this specification is lacking such plain
> common sense?

The specification is almost certainly the way it is because it
is documenting the de facto behaviour of the market leader at
the time.  As you cannot retrospectively change existing 
browsers, I doubt that it will change except in a non-backwards
compatible version like XHTML 2.

> Suggested change to spec: `The onchange event occurs
> when a control loses the input focus and its value has
> been modified since gaining focus *or* in the case of
> select when the option selected has been changed as a
> result of user input while control is in focus.

This is ambiguous because it is not clear whether the
"loses the input focus" applies to just the first, or
to both branches of the "or".  

The Bugzilla report you quote seems to imply that the Mozilla
applies the "loses" clause to both branches whereas IE doesn't
and as it seems to be that you are agreeing with the bug report,
you want IE behaviour.  

IE's behaviour is generally considered broken in terms of keyboard
access as the ubiquitous use of onchange on select is to unconditionally
submit the form, which means every change in the typical such form,
designed by a mouse only designer, causes it to submit.  Are you
really asking for this behaviour?

(IE has a little known option of using alt as a modifier on the first 
cursor up or down in the list, which prevents the onchange triggering -
I don't know if it suppresses it completely or only delays it until
focus is lost.)

Note that the subject can only be proven true if you can quote a
reference as to what the specification was intended to mean.  Otherwise
this is just a change request.
Received on Thursday, 4 August 2005 06:08:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:04 GMT