W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > March 2011

[Bug 12271] <input list=""> needs an event triggered on selection of suggestion

From: <bugzilla@jessica.w3.org>
Date: Tue, 22 Mar 2011 02:58:22 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1Q1rna-0001F7-Kp@jessica.w3.org>

--- Comment #1 from Jonas Sicking <jonas@sicking.cc> 2011-03-22 02:58:21 UTC ---
Usecase 1:

There is nothing that says that the displayed value should be
"art@example.net". The UA could display "Arthur Dosh <art@example.net>" while
making .value and the submitted value be "art@example.net".

However in some instances, like an webmail app, you really do want the
submitted value to be "Arthur Dosh <art@example.net>". For now the HTML5 spec
doesn't satisfy that usecase very well I agree. The best you can do is simply
use <input type=text list=foo>. But I'm not sure how adding an onListSelect
helps here?

Usecase 2:
If you want to build something like the awesomebar then it's not as simple as
adding onListSelect. We only actually navigate if the user clicks or press
enter. If you for example press a key-combo which moves focus to elsewhere we
don't navigate.

One thing that would make a lot of sense to me would be to fire the "change"
event when the user selects something from the @list dropdown. Even if focus
isn't moved to elsewhere. The "change" event is usually fired when there is
some sense of finality in what the user has entered, rather than simply being
in the middle of actively editing the value. That seems to match fairly well
with when a value is selected from the @list.

Sure, the user could continue editing the value, but it seems somewhat likely
that they don't. That's similar to when you remove focus from a field. You
could certainly move focus back and edit then too.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 22 March 2011 02:58:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:44 UTC