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

[whatwg] 'input' event interpretation

From: Jonas Sicking <jonas@sicking.cc>
Date: Sat, 03 May 2008 12:32:31 -0700
Message-ID: <481CBDCF.5050309@sicking.cc>
Rimvydas wrote:
> The question is related to the 'input' event on Web Forms 2.0.
> 
> The WF2 specification says:
> "This [input] event must be fired on a control whenever the value of
> the control changes due to input from the user, and is otherwise
> identical to the change event."
> 
> However, there are a few problems with current interpretation of this sentence.
> 
> The first one - what is considered an "input from the user"? I just
> check on opera and firefox3 - they fire the event when I enter
> something, but if i select an entry from autocomplete list or browser
> fills some forms for me - it is not fired. When I select a value from
> a list I usually want the value in the field to change - it is like
> typing, just faster. I have filed a bug for ff. Maybe a specification
> could be more precise on what is an input from the user...
> 
> Other problem is automatic form filling. Browser remembers some values
> (most frequently it is a login form) and when the page is loaded it
> enters them. Forms are also filled when in a login form user selects a
> name from an autocomplete list (the password is filled). In opera it
> is filled using 'wand'. The problem is - the values of fields change
> silently, without informing the page (i.e. without firing an event).
> Does specification say anything about this situation? If it does not,
> maybe it should? But in this case it would not be an "input from the
> user" so it should be a different event probably.
> 
> Motivation. This would be convenient for various incremental search
> UIs and other cases when page should know about the change
> immediately.

I agree. I think the fact that FF does not fire this event when forms 
are "automatically" changed one way or the other is simply due to bugs 
(most likely because the change is made using chrome javascript which 
makes it look like it's normal page javascript that changes the form).

A clarification in the spec sounds like an excellent idea.

/ Jonas
Received on Saturday, 3 May 2008 12:32:31 UTC

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