[whatwg] input element list attribute and filtering suggestions
jonas at sicking.cc
Fri Jul 29 08:29:44 PDT 2011
On Thu, Jul 28, 2011 at 5:54 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Tue, 3 May 2011, Jonas Sicking wrote:
>> >> It seems to me that a simple boolean attribute and a few lines of
>> >> script solves 80% of the use cases.
>> > What boolean attribute would that be?
>> The mozNoFilter attribute we added in Firefox 4.
> On Wed, 4 May 2011, Aryeh Gregor wrote:
>> I don't see any use-case where you wouldn't want to use mozNoFilter. Why
>> doesn't it just work that way always?
> On Mon, 9 May 2011, Mounir Lamouri wrote:
>> Basically, when you want to use the datalist to suggest a few things you
>> might not want to filter and when the list is long, you very likely want
>> to filter.
>> You might not want to filter when the list is a real set of suggestions
>> and you can type anything else. For example, a field in a support form
>> can ask you "What is your problem?" and you could type a brief summary
>> but some pre-written issues will be available. It's equivalent to a
>> select element followed by an input field that you can use if you select
>> "other" in the list. As I see it, when you filter, you have a very long
>> list and you very likely want the user to select something in the list
>> like a list of bugzilla emails, a list o metro stations, etc. Writing
>> anything not in the list might not work.
> So why don't you just automatically filter if the list is long, and not
> filter if the list is short?
I'm not a big fan of try-to-guess-what-the-author-wants-to-do
solutions like that. Guessing will likely be as often wrong and
annoying as it will be correct and helpful.
More information about the whatwg